To check for wire issues, hot wire the coil right off the battery bypassing the ignition key, resister wire, and wire harness. If it still dies, you now know the wires and switches are good. If it runs, back track up the wires till find a problem.
When it restarts, does it blow black smoke out the tail pipe? does it smell like raw fuel?
Next time it dies, roll to the side of the road and pull the filter for a quick look down the carburetor.
Does it appear wet or dry?
Does it spray fuel when you move the throttle lever?
Don't swapped more then one part at a time, if it made no difference, swap the original back on. You can get into a real mess changing parts, and sometimes never know which one fixed it.
It will be something simple, it always is, as these engines are as simple as it gets.
Joe