An ESC gets hot when it is pulling a lot of amps. In stock racing, on-road, we don’t even run a fan! However, a 5T motor is pretty hot and near the limit for that esc. If your gear mesh is even a little tight, you can draw a lot of extra current quickly. So, make sure that you can wiggle the spur back and forth while holding the pinion and feel a little ‘click’. If you can’t feel that click, your mesh is too tight.
I also run an Xray T4. With the pinion off, spin the front wheels quickly. They should continue to spin for a second. If they don’t you have binding issues in the drive train. Make sure the belts aren’t too tight and that the eccentric bearing holders are set the same side to side so that the spool and diff are aligned with the belts.
After that, make sure that you have a working fan. For gearing, whatever you start out at, check temps after a minute, if everything looks good, go for another minute or two. If you can get to 5 minutes and stay under 140 degrees Fahrenheit, you gearing should be OK. With a 5 turn motor, there is really very little need to over gear! That will be a rocket.