Edit: Probably wouldn't happen though. I feel like if swapping was gonna work, it would be done in smaller vehicles already
Whereas ships are dominated by the cargo profile: shipping containers.
To your second point, let it always be remembered that the first electric busses, from the early 20th century, used a battery swap system. It can be done, especially on industrial vehicles. Personally I don’t understand why it isn’t being done today for electrified bus networks.
https://historicengland.org.uk/listing/the-list/list-entry/1...
How do batteries disperse/degrade or get recovered at sea when the inevitable cargo loss or hull loss occurs?
Possibly the answer to both of those is systemic - but it is at least that.
For the other issue... probably no perfect solution.
Cars: https://www.nio.com/blog/nio-users-china-have-completed-10-m...
Scooters: https://www.gogoro.com/gogoro-network/