It's quite fun to do the math on what it would take to power the largest container ships by batteries. It's not physically impossible but it would displace a good chunk of the usable cargo load.
A single container can contain up to 8mwh of capacity. Just 125 of those gets you to 1gwh. Depending on how quick the ship goes, you might need 1-2 gwh per day. You can conserve energy by going slower. But out of 14K containers, reserving maybe a third for battery could power a ship for quite some time. Enough to e.g. cross the Pacific. There are obvious issues with weight and balance. The volume is doable but the weight creates a lot of issues.
Another challenge is indeed the cost of these batteries. That's about an order of magnitude of where it needs to be to make it financially realistic. But batteries coming down further in cost could make this more feasible. And it's not like these huge container ships are cheap. A couple of tens or even hundreds of millions of dollars worth of battery is reasonable. Billions would be unreasonable.
There are traditionally powered ships carrying many thousands of EVs with batteries already. So, putting a few gwh of battery on a ship is already happening; we're just not using them to move the ship. And batteries made in China are typically shipped to the US and elsewhere for integrating into cars, grid storage, etc. as well. If you can ship it, you might as well use it. And of course battery powered ships are already very popular for lighter short haul like ferries, tug boats, small transport barges on rivers, etc. There are plenty of them operational without major issues. Safety issues seem to be so far not a blocker.
The incentive here is not burning a millions of dollars worth of fuel per journey. Container ships use a lot of fuel. That adds up fairly rapidly to offsetting the cost of the battery. I think the question is not if batteries will be used on ships but how much batteries typical ships will have.
> A single container can contain up to 8mwh of capacity.
That's about 10 months of power for my home and car (gas heating). A 40' container on my drive or buried in the garden would power the house through the winter. It's crazy when you think how solvable season-shifting domestic power use is once you exclude the $1.5m price tag.