You still have classic symptoms of a problem with the crank sensor circuit. The gas and battery gauges are big clues there, as there is often problems with those gauges with a bad crank sensor.
Where did you purchase your sensor from? There have been numerous threads of bad aftermarket sensors right out of the box. The crank sensor is one that I always buy directly from Jeep.
Otherwise, you need to make sure that the crank sensor connectors are good, as well as wiring. Get a can of electrical contact cleaner, spray both the crank sensor connectors thoroughly (there is also one near the #6 injector/firewall), add a small dab of dielectric grease and reconnect.
ASD (autoshutdown) circuit is a remote possibility, but I think you have an engine management sensor problem and the crank sensor is still high on the list.
99 Cherokee, 4.0 AW4, NP242
Past Jeeps: 49 Willys, 81 Scrambler, 88 Comanche
Without "data", all you have is an opinion!