electronic rust proofing
A cathodic protection system will protect against that as well. Any time you expose two different metals (I.e. your boats hull and anything else that might be exposed) to an electrolyte (seawater) you've created a battery and the metal that is the anode will corrode. To protect it you either need to place a more anodic metal in the mix (zinc) or create a counter voltage that stops the reaction (sort of like "charging" the battery). Another advantage is that, in a properly tuned system, you'll only ever need one set of zincs as it will protect them as well.
You actually need to be MORE careful about shore grounding. If you become grounded, your system is now trying to protect your boat, the pier, other boats, and anything else that might be connected. I saw it happen with my ship via its new anchor chain. The lights dimmed and the system went crazy! Not good!