I agree that the first action would be to try to prevent that material buildup on the motor. That is also reducing the ability for it to cool itself adequately which may be contributing to the insulation damage. I would start there.
But you cannot "prevent winding earth fault" electrically. By definition, it is not an "earth fault" until it is a fault, so preventing it is preventing the physical deterioration of the insulation, which is not exactly an electrical issue. You MUST address the factors leading to that insulation deterioration.
One POSSIBLE electrical related solution would be to avoid allowing any internal condensation from forming as a result of the aforementioned wicking action of that wet material when the motors are turned off. While running, the heat from running will not allow that to happen, but when you shut down and the motor cools, the air inside of the connection box cools and shrinks, pulling air in from the conduit, or if sealed, through gaskets. If that air has moisture on it, the moisture will condense on the surfaces as they cool, which allows for hygroscopic absorption through the insulation. Then when the motor is turned on and heats up again, that moisture expands as vapor pressure and can start breaking down the insulation, creating a cascading failure. So to prevent this, you need top keep the motors warm when they are off line. The usual method is to use space heaters built-in to the frame or attached to it, but they need to be powered, which means conduit and wire added to all of the motor locations. Another method is a low voltage "motor winding heater" that trickles a small amount of low voltage current into the motor through it's own power leads, just enough to keep the windings above the dew point. This is done a lot in marine environments where the motors are constantly wet when off line. I suggest that you look into that.
"You measure the size of the accomplishment by the obstacles you had to overcome to reach your goals" -- Booker T. Washington