Pool Motor and Pump Runs and Stops

We have a Sta Rite Dyna-Glas Pool Pump with an A O Smith 2HP Motor USQ1202.  The pool motor will come on and run for about 45 minutes, then shuts off.  It will then come back on at random times and run for a few minutes and shut off.  The motor is extremely hot to touch when it shuts off.  This motor has a run capacitor and a start capacitor.  There are times when the motor will try to start and simply hum for 10 seconds, and after a few times it starts.  Should we try to replace one or both capacitors, or do we need to just replace the motor?  The motor is about 7 years old but the pump is the original.  If we replace the motor, would we need to replace the impeller as well?  Thanks for any advice you can give