Actually every SIM card does this. At least when used by a phone to join a mobile network, a SIM writes some timestamp or counter to persistent internal memory. This caused a funny case of SIM cards with very limited lifetime for a German provider (I think it was Congstar), who had a problem in its network that caused frequent authentications of handsets, thereby having them chew through the write cycles of their SIM cards way faster than projected for normal use. The cards became "dead" afterwards.
If I remember correctly, all chip enabled payment cards also have a transaction counter that is updated on every successful transaction.
Write memory wearout is not an issue. You can do this with write-once memory, so you don't even need flash. Manufacture the device with FF bytes, load keys into it by clearing bits, and then dispose of keys by clearing the rest of the bits. The same could apply to the car, or that could be different. Billions of keys could fit on a key fob.
Wearing out the car door hinges will happen long before wearing out the key fob storage.
Timing... well I don't know, but common ethernet chips have registers that tell the OS how long the cable is. Cars also ship with radar that has much tighter time measurement requirements.
a) Car companies won't want to hand out fobs that have any sort of writable memory, takes battery, and risks write memory wearout. Never seen a fob or smartcard that has memory which is written with every individual transaction. Having the fob do a computation on every transaction means it will need a lot more battery (in Wh per year) compared to a regular remote-unlock key fob for an ordinary passenger car.
b) High precision RF travel/distance timing, onboard computer system in the car capable of reliably determining to within 100ns timing interval, taking into account randomness in the real world environment such as reflections from nearby low-e class windows, metal structures, and such, may not be cheap or easy to implement.