Whirlpool shuts off after 2-3 minutes

Whirlpool gas dryer. The dryer vent was clear to the outside. The dryer starts and begins the cycle just fine. I started it with vent unplugged and it will run about 2-3 minutes with on/off cycle working and the heat output OK. It shuts itself off and will restart fine again. Inside appears to not have any clogs either.
It is about 20 years old, is it done?

After reading some other posts, I turned heat button all the way down. It ran over 5 minutes OK. I changed into the gentle cycle about one third way up the heat scale and it ran less than 2 minutes until kicking off.
Heat control switch???

Ohms test on fuse and thermostat both OK