i have just got over similar problems, (except my coil pack fully blew after a modification to my loom went wrong)
what aftermarket ecu are you running? what coil pack are you using/where does it live in relation to the ecu and loom?
i have recently gone against recommended megasquirt setup, as i believe a gutted z22se coil pack is far superior.
i was expierienceing random missfires and spikes in my maps because of a very noisy ford edis heap of shit coil!
i believe mine is a vr setup,(2 wires) now the only issue i get is a bad signal if it drops below 900revs i suspect that is a rising/falling edge/tooth reading issue.