You are somewhat on the wrong track, even if the direction is right. The intelligent door handles are not necessary. But yes, it also works with them. However, it is not the only possible way.
Two simple door contacts are enough. With them, you can represent the handle position just as well without having to touch the handle itself in any way. In other words, even for lift-and-slide doors, there are possibilities.
And with a bit more logic, you can also store and predict states and behavior of people so that various applications open up here and there.
The lockout automation is actually a task for an apprentice. There are far more complicated scenarios.