2004 Chevy Cavalier

I have a 2004 Chevy Cavalier 2.2 manual trans. Car started shutting off when coming to a stop and when slowing down for sharp corners. Usually starts right back up, sometimes not. When it doesn’t start right back up, wait about 5-10 minutes then it will start. Idles extremely rough. Check engine light on from time to time since it started shutting off. Car has been to 3 garages, including a dealership. Checked by 4 different computers. Changed plugs, coil pack, ignition control module, map sensor, throttle position sensor, upstream O2 sensor, ECM changed, Air box changed. Had fuel pressure test done, and also had the catalytic converter checked. The more its driven, the more it shuts off. Suggestions? Is the crank sensor a possibility?