Problem getting the correct speed on my NEMA17+A4489+potentiometer project

You could use my MobaTools library. This allows to define the speed in RPM. And - in contrast to Stepper.h it is not blocking. You can simply change the speed with your pot while the motor is running.