Three things make a motor overheat. One is phase imbalance. Whether it's voltage or phase angle. Phase angle will create a “Shake” in the motor. Both will create different amp loads. When they vary more than 10%, you have a problem. Sometimes it can go all the way back to your power company. Be aware this includes a high resistance contact on one leg. whether it be a wire join or a connector, or the contactor.
2, Lack of ventilation of the windings. Broken cooling fan blades, grease buildup inside the motor, or improperly placed guards. Fan motor to housing gaskets on some machines. Cooling air ducting
3 Last is overload. Usually bearings or grill. But I've seen a amazing amount of foil in some units.
And I forgot to mention improper wiring. Especially voltage taps in the motor.
They imbed a temperature probe in the windings of the motor to check it for safety problems. Like overload or power problems. Be aware, they are DC and cannot be wired backwards. if so, they will error.