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. Pro-Save E Galvanic Isolator 30A, 110V or 230V AC.
eBay