Yes, it's a chemical reaction due to the lead acid battery you have in place. These have sulfuric acid in them and as they charge some of the fumes can leach into the air around it, carrying the dissolved acid with it. As the material then rests on the carbon steel surfaces of the exposed metal, it creates a chemical reaction, oxidizing the carbon steel it has come into contact with, thus, causing what you see.
Yes, remove the retaining bar, clean it with soap and water, clean it with a grinder to remove the oxidation, then recoat with an epoxy primer and topcoat. Then, if you want that extra layer of protection, dip it in rubber to give it a nice thick coating that is flexible.
Or you can buy a new retainer.