Motor speed control base on speed of an optical mouse movement

FNG to Arduinos so be kind.
I am trying to build something but don't have a clue on how to go about it. I can spend hours and $ or I can ask for help. Here it goes:

Quilting uses sensors on roller to control the speed of the sewing machine for quilting. The sewing machine is setting on rollers and allows it to move on an X and Y axis. As the speed of the movement happens the controller speeds up or slow down the stitching. If no movement the sewing stops. I think that the use of an optical mouse for the input aimed at the table might work better. The motor on the sewing machine is 100 watts.

Looking for help.

A long time ago, as professional, I faced a quilting machine issue. The needle controlling circuits lost precision when changing direction.

I suggest to use the motion controlling part of the machine for sourcing the movement sensor.

Right now, I have nothing but the machine and table. The controlling part if bought is 400 to 500 dollars. I price a real machine to do quilting... about 15 to 19k...

So if there someone here willing to help me... My thought is an optical USB mouse as input, output some form of rheostat as an output. The Arduino running it all.

I might be wrong but to me it looks like You need a partner near You. The presentation is rather vague and lacks all technical information. It's too much to solve in this forum.

You will have to explain the problem a bit more. IF this is working, what is it you want add to the machine?