My truck is doing the same thing. I'm on my second PCM computer. And its still messing up. Check Engine light, Random stalls, no balls, I lose gas pedal response.. then it back fires. My muffler exploded yesterday on highway.
Before this happened, My truck's computer reported a bad ignition coil code. I had my ignition coil replaced and ran awesome for a week.. no check engine light.. then all the sudden, the lights back. I get the backfires/stalls. Too much gas leaking into the exhaust melted my catalytic convertor. Now my muffler blew up..lol. This problem is starting to sound like a surge/short in the ignition coil wire/spark plug wires. Replacing and routing them is said to be the fix for this.
Or.. cam shaft sensor, timing chain loose, bad distributor, bad ignition coil, or Fault with the PCM/ECM.
Make sure the wires are put on in the correct firing order and each end of the plug wire fully engage and seat in the distributor cap and snap properly on the spark plug. Could the gap on one of the spark plugs closed up?
They looked like all gaps was the same and the plug wires I removed and replaced the wire and plugs separately one at the time. The old plugs was hard to remove I had put about 25000 miles after I bought the truck. It has around 180,000 miles now. This has an electronic coil that almost knocked my arm off when I touched the coil wire.. It wasn't missing until I changed the plugs and wires
I had the same problem with my dakota... Try changing the cap and rotor... I changed the cap and rotor and plugs in mine and it still did it, then i did the wires and it works like new now ... So try the cap and rotor next ... My mechanic also checked the underside of the coil with a mirror and said sometimes they crack and moisture gets in there .. Try taking a look at that also... Hope this helps u with ur problem ... GLENN S.