Briggs 12.5 horsepower engine? When it quits, does it have spark? Test by having a spare spark plug, and when it quits, attach the spare spark plug to the spark plug wire, and with the plug grounded, see if you have spark when cranking. If no spark, and engine runs again after it cools, you have a bad ignition coil.
Check this link, to see how ignition works on Briggs.
I doubt the spark plug will do it. But a bad coil will. Thanks.