2000 Jeep Wrangler warms up and shuts down

Will start and idle fine until it starts to warm up, then it runs rough and shuts down. Doesn’t have enough power to pull out driveway. Have replaced and checked several parts. I am an ex diesel mechanic. Am at wits end.

4 cyl or 6 cyl. How many miles on the engine. When were the plugs changed, what did they look like when they were changed. Is the air filter clean? Is the check engine light on?

Does it have a distributor?

160,000 miles, good even compression, new: fuel pump, fuel pressure regulator, plugs, wires,coil,distributor pick-up assembly,catalyic convertor,2 oxygen sensors, injectors,map sensor, computer, air temp sensor, 7 throttle position sensor. I have had a host of mechanic friends with scanners scanners put on engine. Even a retired Jeep mechanic. I am determined to not let it whip me. I have gone back double checking to make sure new parts are good. Bought this vehicle with convertor and oxygen sensor removed.

Check the base of the cam sensor housing near the hold down clamp for evidence that the housing has turned. These cam sensor shafts have been known to seize causing the cam and crank sensor to go out of sync. When this happens the engine won’t run above 2000 RPMs.

Thanks, I will check that.