... excavator is running again, finger jammed, car moved with excavator, lawn mower repaired... Closing time...
Back to the topic:
A second ESP for redundancy might not be a bad idea. Then it has to be on the same circuit so that under no circumstances can only the counting ESP be switched off.
However, it can still happen that both die at the same time, e.g. in the event of overvoltage (lightning strike, power failure) in the network.
I'll keep that in the back of my mind.
While I was working outside, I had another idea: On the one hand, an SD card might not be such a bad idea after all, since only then a single data set is appended to the log file on it (one file per day). On the other hand, this writing doesn't happen all the time, but a maximum of 4 times an hour in the winter when it's icy. And the card is changed once a year anyway.
And as additional redundancy, I could stick a purely mechanical pulse counter onto the board. It would have to have at least 7 digits, but the little Asian have something for little money and with 5V control.
And if I then want to add additional redundancy, I could use a 1sec clock generator (clock module) as a source for the mechanical counter in case the ESP fails, take over control via classical logic gates..