Serious electrolytic corrosion!
The following are just guesses; things that I would examine and try to rule out when doing a failure analysis.
Were there chemical injections of any kind? I saw a 316 stainless float in a level switch get eaten away in a fairly concentrated bleach solution after a few weeks.
I wonder if someone made a pump or an adapter out of zinc or aluminum? The material doesn't look like stainless, though the corrosion may have affected the appearance.
The worst electrolytic corrosion that I ever saw occurred when someone put graphite gaskets between some aluminum parts. Very serious corrosion in less than a month.
If you look at graphite in the table at the link you will see that it is the most cathodic, and will cause any metal to donate from the anode. http://corrosion-doctors.org/Definit...Galvanic_Table
It may be that there was a current leakage from the motor or wiring that was driving an "electro-plating" process, but that usually doesn't happen with alternating current. I would give that a high probablity even though I'm not sure how it would happen. I suppose it could happen if there is some kind of chemical reaction that is creating a diode that rectifies the current.
I have seen reactions that remove iron from cast iron in the presence of copper where there is high carbon content in the cast iron. It might happen if bronze or monel fasteners were used with an incompatible alloy.
Is there any source of DC current, such as a solar system or a battery charger or battery backup?
Any kind of DC system that had a connection to the system might put a DC current into it that would not be apparent without measurements
It might be that there was a bad connection on one lead and/or a leakage to ground that caused current to go through the joint.
Was it a 120 or 240 Volt motor? If 120 then one leg was already grounded.
I would sure like to know the answer when it is found.