My guess is there are ground loop currents causing the corrosion. Is the pump in a metal well casing or in a rock bore? Is the casing grounded? Describe the service feed and grounding. How far from the transformer on the pole to the service entrance? what gauge of wire feeding to the main panel?