Obviously not a mayday situation.
Like with any other breakdown, you would:
1. Switch to alternative/redundant power source (gen or backup power bank)
2. Fix it
3. Get towed back to land and deal with it there.
The merits of having 2 engines or backup propulsion is debated endlessly here. I would think the electric boat guys would consider the same ideas.