I think the digital potentiometer will do the trick. Seems simple enough and I'm not really worried about efficiency so don't necessarily want to go down the PWM route. I guess the question with the digital potentiometer is can I vary the resistance (ie. voltage) and syncronise it with the speed movement of the XY table? So, if the sewing machine sews slower, the XY table moves slower and if the machine sews faster, the XY table sews faster.
Couldn't you just put a sensor (IR, hall effect etc) to detect the position of the needle bar? That way the single sensor would allow you to detect both the needle position (whether it's up or in the fabric) and sewing speed.
BTW what are you sewing? Just simple built-in machine stitches or more like the proper embroidery machines do? A friend of mine recently bought one of those machines and it's amazing what they can create.