First thing I'd check if you have spark the next time it happens. Sounds like the coil is over heating at shut down and shorting. Once it cools down works fine. Make sure the cooling fins are clean.
ive got a 8hp rer and i can mow for about a hour and it just dies i pulled the plug and there was no spark time for a new magneto or whatever its called ive found them used for around 20 used on ebay and 40 new