Not sure if this will be useful for anyone but I think I found the problem with my pump. After a few hours of testing it would seem that from cold the pump would run fine for over an hour then it would slow before stalling. The first time the pump stopped a tap would get it spinning for a few more minutes but it would eventually stop completely and no tapping would help. As I had the pump running outside of the computer I found the base of the pump was slowly heating up and when it became too hot to touch the pump stalled. All the time it was this hot it would not run, cool it down and it was fine.
I carefully stripped the pump down and found that one of the thin wires forming one of the electromagnetic coils had either broken away from the circuit board or was never attached properly in the first place. The wire was barely long enough so if it was soldered down at some point it must have been under a lot of tension (all the other coil wires had a bit of give in them). I took half a turn off the coil, put a small loop in the wire, stripped back the green insulation coating and carefully soldered it back to the circuit board. I’ve now had the pump running continuously for four days without problem and the base is barely warm to touch so hopefully that’s fixed the problem.
In future if anyone else has a problem with their pump it would be worth seeing if it’s getting excessively hot, and if so you might have a similar problem.