During my boating days, on both my power and sail boats I used the provided battery boxes. The boxes with their lids more or less protected the batteries from stuff going adrift and shorting out across the terminals. They were also used as the primary method to hold the batteries in place. They did a good job but they were also, for me a hassle, as out of sight out of mind.
After some battery failures I got more attentive and learned how to eventually eliminate corrosion and acid boil over by sealing the terminal connections, avoiding over discharge and keeping the batteries charged. What I discovered about myself is that the better organized and cleaned I kept the battery compartment the more likely I would continue the upkeep and pretty much eliminated battery failure surprise!
I transferred this maintenance process to our MH and have gotten the same good results. I am not suggesting that the battery boxes won't help but if you are having corrosion and boil over then something is not correct: terminals not sealed, batteries or charger. So the battery box may contain the mess but I am thinking you may be better off trying to find the crux of the problem.
Now if it is "dirt" that you are trying to prevent incrusting and burying your batteries then I would be pretty interested in knowing how your project turns out. There is not a trip that we take which doesn't result in a new and deeper desert on the battery tops. So far I have not figured any way to seal the back side of the battery compartment sliding trays from the engine compartment because of all the wiring. So a battery box for each battery with lids might be a good prevent the dirt solution. Or better yet, one big box for the three house batteries and one big box for the two engine batteries. I think I am going to look into the boating and truck world's to see if I can find a multiple battery box.