If you suspect the plug in question is OK and the issue is somewhere else, you could try a temporary set of wires between the relay and the harness to create a secure connection. That way you don't create any unnecessary permanent modifications. I ended up with 2 good GP relays so I didn't have an issue modifying one.
When I got the car, the previous owner put a zip tie around the plug and GP relay to keep it tightly clamped down and that worked for a good long while.
I almost bought a new K40 relay as well but instead I re soldered all the joints in the old K40. It was causing a different stalling issue but maybe its related? I can't say for sure but the plug on the GP relay looks like the likely culprit to me. I don't think replacing the K40 relay is a good solution for anything because they were ALL very poorly soldered from the factory. Its only a matter of time before the new one fails as well and the fix is dead simple. Anyway, let me know how it works out.
good luck
EDIT:
Here's how to fix the K40 relay. It can be the source of a lot of different problems.