Installing a Galvanic Isolator / Zinc Saver will maintain a good earth link with the shore, but prevent stray currents coming up the earth line and damaging the boat. 30 amp Galvanic Isolator ZS30A. Pro-Save E Galvanic Isolator 30A, 110V or 230V AC.
eBay