You can check state persistence by cutting the gate's power during operation. When the power comes back on, your next button press will trigger the next operation in order, not the previous one (if you cut the power during opening, the next button press closes it and viceversa).
https://www.seco-larm.com/product/sr-1212-c7alq
And
Such an interface cannot get any more exposed than that. There's no reason to throw a stew of TLAs at the problem.
(I have a strong suspicion that nobody responding here actually -- you know -- looked at this problem as it actually exists before deciding that it somehow cannot be resolved.)
You could add a current transformer around the motor conductors to handle the ‘is_moving?’ case. If there’s measurable current flowing through the motor leads, the motor is turning. That’s how you determine the on/off status of a fan or pump motor in a building automation system.
Magnetic contacts or end switches on either end of the gate could handle the ‘open’ and ‘closed’ cases. Magnetic contacts are widely used in commercial doors for access control, and end switches are used for air damper open/closed status in building automation systems, to give a couple examples.
Not sure about the ‘blocked’ case, that would depend on what the gate motor controller does when the gate is blocked. Some kind of sensor that uses the photoelectric effect, I would imagine.
Of course, the trend in consumer product interface is either nothing or a full web server with a "cloud" connection and an app. With ads.