seabrook-
Your concern is quite legitimate. However, while salt water is conductive, I don't believe it will short out the lower battery across the submerged terminals so much as to cause the voltage to drop to a dangerous level unless it were left in that condition for some time with the engine (alternator) not running.
As a guess, I doublt more than 25 amps of current would flow across the top of one battery, and with the alternator running (16-40 amps output), you'd not be in immediate danger.
However, if the salt water immersion were to include more terminals and electrical equipment, the answer could be significantly different.
I'd be sure my battery box liid was well secured for starters. Also, coat the terminals and posts with dialectric grease to minimize exposure of current conducting metal. Alternately, the terminal metal parts not conducting current can be coated with Plastisol (plastic tool handle liquid that will harden). Finally, the battery box could be moved elsewhere or the box left where it is and bolted down on some very secure platform to raise it 8-10 inches, depending on space available overhead.
If a very large sea were to dump ("POOP") on you from astern, the situation would be more serious, but the battery in the starboard lazarette wouldn't be flooded unless you were close to having the gunnels level with the sea level, in which case it's time to abandon ship anyway.
If I were operating in such conditions regularly, I'd also be very concerned with the bilge pump capacity available. Have not one, but two pumps. Each should be wired separately and should have a minimum capacity of 2000 gph (IMHO). Your best defense is to be able to recover quickly by removing the water. Too large a POOP and you're done anyway, as sea water will enter the boat as fast or faster than it can be pumped out!
Do you have a "plate" that blocks the cut out at the fron end of the motor well to raise the entrance level 12 or so inches? This is another easy defence in the War Against the Poop Gods!
I need to point out that what I've said above about the battery situation is just a product of my rational approach to the problem. Examination of anectodal accounts of swampings may or may not be in agreement. If you refer to such accounts, keep in mind whether you're reading about inboards or outboards, what kind of hull and bilge configuration is represented, and where and how exactly where the batteries and wiring are placed. It would be very easy over-generalize from such information.
HTH!
Joe.