I've had my latch to bits, and there are two motors for locking the door; one is the basic lock, and the other is a deadlock.
The deadlock is a smaller motor, but drives the lock system as well as the deadlock system.
When you unlock the car, the deadlock is cleared, and you can then manually open the door (from inside) which releases the lock mechanism.
When you drive the car with auto-lock enabled, the locking motor alone fires to lock the car. (In the case of this fault, the lock motor failing to lock the car means the warning LED in the interior lock switch does not light)
When you lock the car with the fob, the deadlock motor will drive the lock to shut, which both flags the latch as locked, and the deadlock engaged.
Thing is, these are can motors, so quite hard to take to bits.
Regarding swapping the latch completely:
On the A4B8, the electrical connector is 2*3.
On the A5 (latch p/n ends in C) the electrical connector is 1*6
And whilst looking for the replacement parts, a Porsche uses the same part number as the A4B8, but the electrical connector is 2*4.
Oh, yes, the motors are different, too.
The A4B8 has the brushes away from the pinion, whereas the A5 motor (latch p/n ends in C) has the brushes beside the pinion. The electrical connector spears directly into the brush zone.
I'm going back in, to strip down the motor; I've tried rotating the motor (so it stops on a new bit of the commutator) and running the motor for a while (to clean the commutator and brushes), but I think I need to go in and strip the motor and clean the brush/commutator.
Or, at very worst, find the motor part number so I can find a replacement motor that I can fit the pinion to...
Hope this helps.