I don't think bad gas would do that. If it isn't your exhaust system, and it sounds like it isn't, it must be electrical.
Make sure your gas filter is new, but other than that, I would look at the distributor. i know you replaced cap, rotor, wires, etc. But maybe it is your module or the actual distributor itself.
Just a few guesses.
SgtDel