Stalling lumina

I give up! I have a 1997 chevy lumina that sometimes runs great and then for no reason at all starts to run ruff and stall and will not start. If I leave it set for an hour it starts up and runs fine. I’ve replace the following. EGR valve,coil pack,spark plugs,plug wires,fuel filter, gas cap, air filter and finaly the intake gasket set for good measure. I’ve checked the fuel pressure, vacume for leaks and compression in the cylinders and found everything all in spec with the car manual. I don’t know were else to look and it drives me crazy not knowing when it will do its little trick and leave me stuck. I open for any suggestion even if it sounds crazy. let me know what you think. thanks

The problem might be with the crankshaft position sensor. Measure the resistance for the crank sensor with the engine cold to see if it’s within specs. The next time the engine stalls, measure the resistance at the crank sensor. If it’s out of spec, the crank sensor has become heat sensitive and is failing.

Tester