Another thing to think about is wiring. There could very easily be a wire that's loose, has some cracked or broken insulation or is corroded that is causing these intermittant problems. Works...doesn't work...works...doesn't work.
Might be worth your time to look at the terminal block on the engine, the wiring plug for the wiring harness that goes to the dash and under the dash itself. Also any wiring on the distributor.
Verify nothing is loose, corroded, rusted, broken, pinched or shorted anywhere. You may have to remove them one at a time to check them thoroughly. Give a tug on each one and make sure nothing is loose. It's a pain in the butt. The littlest thing might cause a problem like this though.