Is the primary air intake from the front of the box?
At 50 boxes, even if they heat up for example 20W each, you are still looking at 2kW equivalent hit air that needs to get removed.
That being said, id stack them in a manner where airflow is the primary concern here.
If air is from to back in that box, stack tight like a brick wall, leave no space around, and put enough fans from the back to pull all that heat out.
If the box expects air from the sides too, well I guess you’ll end up spacing them and having even more fans to pull the less efficient cooled air out.
You want to measure the temps there as you are building/running this.
It’s consumer boxes too, you really want to buy a fire extinguisher too, they are very cheap nowadays.
Some would argue that not having them, is a great strategy for breaking in the system :P