So, if all else fails and it gest narrowed down to the relay, you can ship it to me and I can de-solder the AC and move it to the fuel pump location. There is another option, where you can solder a fuse holder pigtail to the circuit card and remotely locate the relays off of the board. The relays would be the standard automotive grade/size. The downfall is that it is not as clean of a build, but much more serviceable.
So for the actual issues of the engine running poorly:
The relay contacts could be sticking causing the pump to run intermittently. It could also be a PCM not commanding the pump to run.
First thing that you need to check is the condition of all of the connectors.
Crimps-solid crimping and soldering are key to good connections
Water intrusion-Anything that may be exposed to rain or car wash water. Look for discoloration in the strands of the wiring.
Grounds-high resistance. Sometimes this can be fixed but loosening and retightening the ground eyelets, but removing corrosion with a wire brush is best.
Condition of wiring insulation. Anything routed close to the exhaust or bound up too tight/bent/pinched etc?
Battery condition-fully charged and no corrosion on the terminals.
Fuel pump motor-depending on age, the motor could be taking extra current to run or getting too hot and seizing.
Measure supply voltage- you should be supplying very close to what the battery voltage is-to your ECM/relay module
Measure ground resistance-you should see very few ohms of resistance. Check from the battery negative terminal to each ground eyelet. If one ground eye has high resistance, it could create a ground loop but attempting to ground through a different component (easier path)
Voltage drops-basically, you are measuring how much voltage something is consuming.
Your ground side should be less than 0.1VDC (measure from the negative battery terminal to the Ground supply)
Battery positive should be less than 0.3VDC (measure from the positive battery terminal to the power supply IN)
If that is all in good shape it will help lead you to isolating the fault and finding the root cause. Once again, the relay can be swapped but if something else is causing the relay(s) to overwork you will run into this issue again.