Engine dies, but turn the key off and back on it fires right back up
above are three good starting points. I have come across all three of those at different times in the past.
I have had bad/loose battery terminals cause what you're describing.
Also had a bad main ground cable at the battery that had corroded inside. merely moving it around would connect/disconnect ground current.
and yes...also chased a bad pickup coil in the distributor...but...that was never a "fired right back up" thing. it would die for hours...then you'd hit the key and vroom.