Had this problem with a 21 HP B&S about 15 years ago. The key that positions the flywheel (and magneto) relative to the crank (times the spark) had partially sheared, causing the spark plug to fire too early. Preignition - overpressurized the cylinder and kept blowing out head gaskets. Check...