Water won't but acid will damage a lot of things. That's why battery boxes don't have holes - To keep acid inside in case of boil-over.
I agree if you are using non-sealed batteries. That would be the kind that you add water to and have screw, or pop, off tops on the cells.
While not totally impossible, it is improbable that a sealed battery will boil over.
A more likely, and more dangerous, situation is if the sealed battery in a boat is overcharging. SLA batteries are designed with either gel, or lower acid levels to account for possible boil over.
They can, however, in rare cases of over charging, cause the acid to change into a gas and escape via the vent built into SLA batteries. If that happens you have a much bigger issue than leaking battery acid.
The gas is highly flammable and is the main reason boats have vent fans in the engine compartment. It is also a main reason it is recommended you run your vent fan for a few minutes before starting your engine.
I have to lift my engine cover to turn on the electronics in my boat, I usually just leave the cover open while I start the motor for the first time of the day to allow for ventilation.
My batteries are SLA, the boxes have drain holes, and no tops to allow for venting.