Hi,
Should I be thinking along the simple things to try first...this is the order I would be attacking things;
I would swap over the relays and see if the problem repeats itself (obviously do this when in the same comparable circumstances, as to when it is known to cause issue)
If you can and it's possible you could also swap over the blue and green wires...the above thinking applies again.
The above will then tell you where to go next.
If the issue is repeated, but for the opposite direction, then its the relay itself
If the issue is as it was previously, it is most likely a continuity issue, or lack of it !
Start with looking to see if anything electrical and related is hanging loose or open ended, into the bilge or bilge water.
The above ruled out, Check the continuity of the earthing circuit from there to a known earth source or battery earth.
I would also just ensure the power feed to the pump is healthy. You could even supply a known source of 12v direct to the pump in each direction (while allowing each relay to make it's circuit), just to make sure that she's healthy both ways there.
The above might even lead you to the trim switch or its circuit being to blame.
I suppose it might also be handy to know if it just won't even try to trim up at all and all seems dead and silent..perhaps only a click ?
Or does she seemingly try to operate with the pump at least sounding like it is making an effort ?
assuming the oil is to level and no sign of water in there ?
Hope some of that might help you. Sorry if it has been ruled out or covered before me sticking my oar in !