I have had exactly that problem, the culprit appeared to be carbon dust from the motor brushes (there are four) which either stopped the windlass from working, or alternativelycaused the chain to run away.
Once I cleaned it up and also checked and cleaned the conniptions as Bill describes it all ran normally .