That on-off pattern after a pretty consistent time window is almost textbook thermal shutdown, but it’s usually reacting to something else, not just “old motor, time to die.”
One thing that gets missed a lot is voltage drop. If the pump is on a long run, shared circuit, or the supply voltage sags when other equipment kicks on, the motor pulls more amps to do the same work and overheats faster. Everything looks normal at startup, then 20–40 minutes later the internal thermal switch trips. When it cools, it’ll restart like nothing happened. If you notice it happens more on really hot days or when other big appliances are running, that’s a clue.
Another angle is airflow. Even if the motor itself is fine, blocked vents, a cracked fan shroud, or the pump sitting in a tight corner can trap heat. I had one that shut off like clockwork until I realized mulch and leaves had slowly built up around the base and basically turned it into an oven.
Capacitor is still a strong candidate too, especially if it sounds a little weaker or slower to spin up each time. But before calling the motor done, I’d clean baskets and filter, check impeller, clear airflow, and see if it runs longer when filter pressure is lower or ambient temps are cooler. If it always shuts off at almost the same time mark no matter what, then yeah, you’re probably looking at a tired capacitor or motor windings starting to go.