Motor Encoder - Program an action for every loop

Do you need that resolution? It might not be too hard to make, say, a 6 count per rev encoder with a Hall Effect switch or optical sensor. Then use millis() for the dwell.