Next time the engine dies on you and won't start, check to see if you have spark. Also look down the throat of the carburetor while goosing the throttle lever, looking for a squirt of gas. Those two tests will narrow down the possibilities as to what's wrong.
Heck, you could have a defective coil that craps out when it heats up internally but works fine once it cools off, AND 2 bad fuel pumps at the same time.