The plastic that holds the rack in contact with the teeth of the pinion cog on the motor can break when a mirror gets hit, resulting in lack of drive. You should be able to make out what's happened if you operate the motor with the glass out of the way.
I bodged one or two of these back into working order back in the days when E30s weren't found in scrapyards, but there's plenty of spares around these days, so just get a second hand replacement. Just four screws to undo, and four wires to pull out of the back.
Note that only one of the 'motors' is actually a motor. The other one is a solenoid, that switches between sideways and up/down movement.