I think it may still be a grounding problem?
The issue may be that differences between the engine block ground and chassis ground may cause the reference point of the magnetic pickup trigger to change where the ECU is not sensing the pulses from the distrubitor. Which leads back to replace battery cables, and add grounds from ECU to engine block, and battery to chassis.