Those intermittent problems are hard to track down until they permanently fail. Do not rule out the fuel system, a dying fuel pump, dirty fuel filter/sock, and/or a fuel tank vent problem may give similar effects. If it is electrical, I would first suspect the ignition switch.