I've had this happen. Our boat has a separate battery for the generator, so normally if you accidentally drain the main and engine batteries, you can recharge via the generator. But during maintenance someone reset a switch that connected the generator battery to the mains without realizing it. We were in the proverbial middle of no-where - I had a 1+ hour row in my dingy to a remote camp to find someone to rescue us (jump-start the generator).
Now I never leave the dock without one of those portable car-starting batteries, completely disconnected from everything.
Now I never leave the dock without one of those portable car-starting batteries, completely disconnected from everything.