I disagree with either battery going bad.
I think the door latch in the door is either bad, or there is a damaged/broken wire somewhere.
The key fob sends a radio message to the Radio Transciver Module/Tire Pressure Module which will then relay the message to the Remote Function Actuator module or the Body Control Module . The RFA/BCM then locks and unlocks the door. The three passenger doors are controlled together. The driver door is usually controlled by a separate relay. This is for the stepped unlock if you so choose to use. (Driver door unlocks, then all doors unlock)
If the key fob was bad, all doors would be afected. If the 12v battery was bad all doors should be afected. Although I dont disagree with testing the 12v battery, its lower on the list.
The door latch itself will have two circuits that reverse polarity to lock and unlock the door.
If there is some movement from the lock rod when locking and unlocking the door, there could be high resistance on a circuit or a door latch that is bad.
If it doesnt moves then there could be an open on the circuit or a bad door latch. That flex joint between the door and the body is a common area with Ford for wires to break.
One will have to get the multimeter out and figure what's going on.
Since I'm on the mobile I dont see signatures so I'm not sure of your cars modle head to give you wire colors to look at.