I wanted to fix this once and for all by replacing the solenoid with a spare 1098 one that I have and replace the loom connector with one that matches the inline connector on the solenoid but was unable to find a source for the connector anywhere.
However, since the original solenoid itself was ok but it's connector was source of the problem, I decided to modify it. I soldered wires directly to the pins in the connector and fitted an AMP Superseal connector to the other end, fitting the matching connector to the loom. It's working great now. The white goop is silicon I used to seal the soldered joints.