Well, There can be several possibilities...the first thing I would do is test power coming in and make sure you have 220V between the two hots, I've seen a GFCI dropping a leg of power cause issues like this.
Second, I would pull the pump fuses and test them...the key is to pull them then squeeze the clips that hold them back together. If that fuse isn't seating well in the cradle it will cause intermittent issues.
Third, put a meter on the pump plug coming out of the box and see if you are getting consistent power there. If the pump is 220 you should get 220v between the black and white on low and red and white on high in most cases but the motor schematic can tell you that. You could have a relay going bad on the board that is sticking and the only real way to know that is with a meter.
Last, the motor itself may have a centrifugal switch that is coming apart...they often have two springs on the switch that come off one side or the other and work intermittent. The springs are on a clutch that activates a double micro switch. The metal reeds on the micro switch can also be burned and arching across.