I mentioned two possible reasons for the problem in the last two paragraphs in Reply #2 and you do not seem to have responded to either of them.
The power supply issue is not whether sufficient power is available, but whether it is occasionally very briefly interrupted - perhaps when some other device is turned on. A glitch for less than a microsecond will be enough to upset an Arduino.
A work around would be to include in your program code that checks the state of the limit switches between every step.
...R