Always treat mechanical devices in a non-deterministic fashion.
Salesmen have to remind every new customer about this, since sooner or later someone locks themself or someone else in the car and the remote has walked away...
There are techniques to monitor the health of the switch and know when the sensor is failing/has failed. THEN you can whack the solenoid to your heart's content if you believe the sensor is damaged. But if you have a working sensor, there's no need to overstress the solenoid and mechanical linkage.
But if you're locking/unlocking your car over the internet with this funky API and want to be sure it's locked, how do you do it? You don't hit the solenoid 20 times and say "well, good enough".
Wait, perhaps I am understanding it wrong, but if I were to consider a lock sensor as non-deterministic, wouldn't that imply that I always have to send the unlock signal, regardless of lock state, because you don't trust the sensor?
You do not trust that because your boolean in RAM says "locked" that the door is locked.
Now whether you trust the sensor to be functional or not is another story.