Check in the following order:
Check for fuel at the vacuum line connected to the fuel pressure regulator. Any fuel there means the FPR is bad and flooding the engine.
Press the gas peddle and hold at WOT while cranking until it starts, to dry out a flooded engine.
Pull the spark plugs and check them.
Primary high voltage wire or secondary wires arcing? Inspect while cranking in the dark, for signs of arcing to ground, bad insulation.
Jump the white ballast resistor to the fuel pump with a jumper wire, or test the resistor with an ohm meter. It is the run line for the fuel pump, and is bypassed while cranking.
CPS maybe going bad.
IAC maybe sticking.
Plug off the vacuum line for the EGR. Tap the EGR lightly with a screw driver handle (don't dent it), if it is stuck open a little jarring will usually allow the spring to seat the valve.
Completely disconnect the ballast resistor and jump the two wires together, they can short through the back if the housing is damaged (happened to me).
Volt test the fuel pump wires at the resistor jumped connection, 1, while cranking and 2, when the motor starts before it stalls. Check the voltage again in the rear near the pump while cranking and while the motor is running before it stalls again. At least five connectors and a splice between the resistor and the fuel pump.
The orange/black wire at the starter relay is a straight shot to the fuel pump, around the fuel pump relay and the ballast resistor, except for the five connectors and a splice. You can disconnect that wire from the starter relay and jump it straight to power and do a volt test from there and another all the way in the back at the fuel pump plug to test all those connectors. You can actually get good voltage and a connector can still be bad or making a poor connection.
The CPS is a long shot IMO, if it was marginal the motor likely wouldn't start, BUT, I have had them start then had the CPS mess up as it heated up. As a long shot I'd do an ohm test from the CPS pigtail all the way to the ECU. Be careful with the ECU connectors, the pins have a tendency to back out of the holder when you mess with them. The wiring and connectors between the CPS and the ECU has a history of weakening the pulse signal from the CPS and making for intermittent problems.
I'm really not much on swapping out parts and hoping to get lucky. I almost always test the part, sensor or whatever then the wiring and connectors before I swap out anything. I usually see a Jeep after the other mechanics have failed and have learned to systemically and thoroughly test a whole system (components, wiring and connectors) before moving on to the next system, if it was easy it would already be fixed.
I'm guessing fuel, but it may be something else, either the CPS pulse gets weak, a sensor screws up and causes the ECU to open the relays or some connection is bad. If it isn't the usual suspects it is something exotic.
A fuel pump pressure and volume test is probably a wise thing to do.
You have to understand the systems, the CPS pulses at start up, if the ECU doesn't get a good pulse it shuts off the fuel and spark. So you can get low (no) fuel pressure and it has nothing to do with the fuel pump, filter or whatever. The ECU primes the fuel rail when the key goes from off through run to start, so you can get initial fuel pressure ( a fuel rail prime), but when the key goes back to the run position you need a good pulse from the CPS for the ECU to keep the fuel pump relay closed. During cranking the fuel pump gets power straight from the starter relay, then when the motor is running (good CPS pulse) the ECU closes the fuel pump relay and fuel pump power comes from there, through the ballast resistor.
A word to the wise, don't get fixated on components and ignore the wiring and connectors, understand the system some before you start. Some of it is cause and effect and you can guesstimate what the problem is. Most times a systematic approach works best and any shortcuts in the step by step process and you are likely to miss the cause and have to start all over again. Or worse yet, build more problems into the system while trying to find the original problem.
It is really easy to screw up a brittle 20 year old plastic connector and/or back a pin out of a connector as you are reconnecting it. Most Jeep connectors give me fits anyway, it seems most were supplied by the lowest bidder and most every one has a different and unique patented latching tab that is almost impossible to see or figure out how to open.