My boat is daily launched so is unlikely to ever have a flat battery due to the bilge pump. But it has 2 batteries and a battery selector switch (off, battery 1, battery 2, or both batteries connected).
I recently took the boat to the river after not using it for 5 weeks, turned the key to start it, no start I just heard a click then saw the voltmeter was reading off the bottom of the scale. Checked to see which battery(s) were selected on the switch, thankfully only one of the batteries was selected. Turned the switch to the other battery and it started straight away... I'm not sure what flattened the battery that was flat but I was pleased the boat had 2 batteries and the ability to easily switch between them.
This reminded me of something I had intended to do but never got around to it... With only 1 battery selected on the switch the alternator only charges that battery but if I fitted a voltage sensing relay setup I could leave the switch with only one battery selected, it would still charge both batteries when the alternator was running but any electrical load while the engine wasn't running could only flatten the battery that was selected at the switch... I had intended on fitting a voltage sensing relay that would connect both batteries in parallel whenever the alternator was running even if only 1 battery was selected on the switch.
Voltage sensing relays usually switch when they read above around 13volts. Some have only 3 wire connections, a common earth, connection to a primary battery and a connection to a secondary (or leisure) battery, if a type with only the 3 connections were fitted it would work to charge battery 2 (the secondary battery) if battery 1 (the primary battery) were selected on the battery selector switch but if you selected battery 2 on the battery selector switch it wouldn't charge battery 1... unless you fitted 2 such relays and wired them so each battery was wired to the 'primary' of 1 of the relays.
But some voltage sensing relays have 4 wire connections, a common earth, connection to a primary battery, connection to a secondary battery and a separate voltage sense wire (the voltage sense isn't hard wired inside the unit to the primary, you choose where to connect the voltage sense wire to). If a 4 wire relay were fitted and connected to each battery via a diode (2 diodes) you'd only need 1 relay and would have a system that charged both batteries if the battery selector switch were set to either battery 1 or battery 2 but if it were supposed to switch at 13volts it might switch at 13.7volts due to a 0.7volt drop over the diodes... although you can buy voltage sensing relays with adjustable switching voltage so could set switching voltage to 12.3volts and it would still switch at 13volts. In fact it just occurred to me the diodes wouldn't be necessary, just connect the voltage sense wire to the charge wire of the alternator.