Motors working without activating them

You should read this…

Using an interval timer instead of the code in your void loop would be a good start.
Using timeout timers rather than the millis comparison in the example you found would be a good approach, although you may need to se nested timers if you want commands to run consecutively rather than concurrently.

Pete.