I'd say there's a seal sticking so you have lost compression in one face of the rotor. Try a compression check, even with your finger with the plugs out, just to make sure there's even pressure when it's turning over.
I'm not sure if it's possible, but if the crank angle sensor was going bad, or a tooth on the sensor was corroding off, there may be a miss if the signal is going away once in a while... seems like a long shot though.
What died on the first engine, and at what mileage?
Dave - 2007 3GT - black, badges removed, door bumpers removed, auto up windows, backup sensors, adjustable HID headlight modification, current limited high beams, fog lamps able to be on with parking lights only, under seat subwoofer. I'm usually on mazda3club.com instead of here - where many of the above 'mods' are that show in my signature.
Used to have GSL-SE's too