Doesn't sound electrical unless a wire is getting pulled until the restarts.
Check the choke and make sure it isn't sticking. After throttling up and down while restarting it might be coming unstuck and allowing it to run.
Fuel, air, spark. That simple.
Don't forget to make sure the flame arrestor is clean.