For the past couple months my car has randomly not been wanting to start. Sometimes it's totally fine, other times it won't start for a good hour. The fuel pump relay was replaced, that helped for a bit. Then it started doing it again. So I replaced the fuel pump. That seemed to help for a day and now it is doing it again. It sounds exactly like it is going to start but it just won't turn over. Also, when I am driving the check engine light will come on, but only rarely. It also idles sort of rough sometimes. Like a little hiccup.
You can retrieve trouble codes manually. The relay tends to fail intermittently but since it did not solve the problem, it most probably is a failing ECM. If you are good at electronics, remove the ECM and check for leaking capacitors. Replace them and it should be good.
Note that when the engine fails to start, does the MIL goes off after 2 seconds of turning ignition on. If no, then the ECM is failing as you have replaced the PGM-FI main relay.