Maybe dodgy connections since you rewired it several times if it is a dodgy connection I would think it inside the stepper motor.

You can split steppers to check have a look on you tube.

I wouldn't trust a motor that had done that to me unless I traced the reason it happened because it'll cost a lot more than a new motor would if it starts skipping steps on a work piece.