Hello and welcome to JustAnswer!
Did you use a Mopar crank sensor? Many problems have been seen with aftermarket sensors. If you used a Mopar sensor or the symptoms didn't change at all after replacing it, you may have a bad cam sensor.
The cam sensor on your 4.7 is located on the right side of the right bank head, just in front of the exhaust manifold. The cam and crank sensors share the same sensor ground and 5v reference circuits, and an internal short in either of these sensors can take the other down and set a fault code for the opposite sensor.
An internal PCM problem or even sensor wiring would be possible (wiring not as likely since it restarts with a cool off period), but I believe you have a bad cam sensor. Cam sensors fail far more often on a 4.7 than a crank sensor, and I believe that is probably what you are fighting.
If the fuel pump keeps running on it's own that's another vote for the cam sensor.
When you turn the key on the ASD and fuel pump relay will power up and then turn off. When you crank the engine it watches for the cam and crank signals and make sure they are in time. Even if you turn the engine over by hand or if you trick the PCM into thinking the cam sensor is producing a signal, the engine doesn't have to be running and it will power the fuel pump relay back up because it thinks the engine is rotating and will be starting. I really believe the cam sensor will fix your issue. It's either that, wiring, or the PCM, but cam sensors are pretty common with all of the symptoms you've described. If the fuel pump stays running consistantly every time it dies, reach up and unplug the cam sensor. If this shuts the fuel pump off you know that's the issue.