Why did my dryer shut off in the middle of drying a load?
The heating element would not work at all if a leg is broken. If the clothes were warm when it shut down, then it clearly just happened. The online wiring diagram is virtually impossible to read, but it appears the heating element is interlocked through the motor controller. It's conceivable that if one part fails, the other is shut down, but it's impossible to tell from what I have available.

It makes complete sense to go ahead and repair the heating element since it is obviously broken. Don't worry about thermostats etc. at this point, fix what's broken and go from there. There's a fair chance that's all that's wrong.