At Amazon scale, I imagine they strip the original chassis and use only the motherboard with custom power and cooling for some insane density. As visible here https://youtu.be/R4ArjHz4gd4?t=192 you could save some significant space doing so.
I imagine you could get 4 in 1U if you used all the depth, and perhaps more dense by putting them onto their side in 4U (maybe 5U..not sure how tall a M1 Mini is). I don't know to what degree cooling is an issue, where you don't want the exhaust of one feeding the inlet of another.
There's an image there that appears to have the units mounted sideways for perhaps 6 minis in 2 RU?