This isn't doing what the comment says:
int newCustom = map(customDelay, 0, 12000, 10, 6000); // Convrests the read values of the potentiometer from 0 to 1023 into desireded delay values (300 to 4000)
I suspect that your delays are too short and that therefore you're stepping the stepper faster than it can react.
What size delay did you use in the test code that did step the motor?