The car will already have circuitry that operates the folding mirrors,
based on whether the switch is detected to be in the "folded" position or not.
The motors that actually fold the mirrors do not receive constant 12 V one way or the other.
When a mirror folds in, it stops at some point, and that's because a sensor switch senses that the mirror has reached its folding edge,
and then tells the circuitry to stop the motor.
When it folds back out again, another sensor senses the correct position for that,
and does the same thing, so the mirror housing stops in the correct position.
What you need to do is find the relay that operates the folding mirror, and somehow link it to the central locking.
Heaven forbid it be the UCH, although I have a bad feeling about that one.