I might be wrong but this is how I see it.
Your ESC will get hot if your pinion is to big.
Your motor can get hot if your pinion is to big or to small.
If you put a smaller pinion on the load on the ESC goes down (less amps) ???
The sweet spot is when your ESC and motor are the same temperature ???