AFAIK, the main issue besides actually frying the controller is that it loses efficiency as it gets hot, so ventilation or fan cooling is good for getting more output watts (compared with input watts from the array minus line loss there) which is divided by battery voltage to get your amps input)
Most have small heat sinks and have those fins outside the casing to allow venting up the back if wall-mounted. Better to keep the whole thing clear of a wall for more venting space if possible (hang it by a string--no kidding!)
With it in a cargo bay, and the door left open to improve ventilation, it still has to be back far enough so it is out of the sun. Parking on grass is way better than parking on asphalt of course, whatever else you do.
I have my Eco-Worthy screwed down half way up a wall above the batteries, which are not in a box. Much of it is clear of the "wall" and it gets good venting. I have had no problem with battery gassing eating the controller either, despite all the warnings about that. (The inverters are behind the "wall" farther in)
1. 1991 Oakland 28DB Class C
on Ford E350-460-7.5 Gas EFI
Photo in Profile
2. 1991 Bighorn 9.5ft Truck Camper on 2003 Chev 2500HD 6.0 Gas
See Profile for Electronic set-ups for 1. and 2.