Local ressilence is needed in any case and mass produced batteries can provide that safety.
Are you sure the parent isn't referring to something like a rust (iron-air) battery? Aluminum, Iron, and Magnesium are all viable battery chemistries.
Side note - I'm pretty certain you don't actually need to make contents of a ship explode to easily sink it with explosives.
I'm actually somewhat concerned that between drones and smart mines - we've never had a better chance of completely ruining our ability to do ocean based shipping during combat.
No it doesn't.
Magnesium metal burns because the boiling point of magnesium is just 1091 C, so extremely reactive vapor is readily produced. But it would be very hard to heat it that high in water unless it was ignited first. It will then continue to burn under water.
https://en.m.wikipedia.org/wiki/List_of_oil_spills
But the problem mentioned above was about war.
This consequently scales down the scale of any spill or security issue.
Like the difference between nicking a capillary and nicking an aorta.
The metal fuels in particular have the merit that you can use them in precisely such mass-produced batteries rather than to produce thermal power. As I alluded to in my grandparent comment, aluminum-air batteries were mass-produced in the 01960s.