Next time it quits running check to see if it still has spark. If it doesn't here's a link with some troubleshooting. Club Car No Spark Troubleshooting
sounds as though the coil may be overheating i have heard some folks would have this problem and pour water on the coil to cool it down and cart ran good until it overheated again. may want to give this a try next time.