Pool pump overheated but came back on after coolinh

hey all I noticed a pin hole leak on black basket unit above where it connects to my Hayward Super Pump.  It’s worse during backwash.  Then yesterday during the hottest day of the year, the pump overheated and stopped.  Today however it started up fine.  Did you think this is related to the pin hole which may have been created potentially by bearings going bad?  Or do you think the pump simply overheated and shut itself down on purpose?  Thanks!!!