Use delayMicroseconds() or micros() instead of millis() than the error is 100ppm.
1 line of code.
I have done something similar in my code with a leap step when you want to turn 1.81 degrees repetitively.
Assuming 1.80 is your step size for example.
Only a few lines of code.