Need help configuring HAProxy for exclusive access to a remote lab web application


I would appreciate your help because I am using haproxy for a very specific project and I am not an expert.
I am developing an electronics remote laboratory web application to develop remote practices and I need that while someone is using the laboratory, it does not accept new users. To do this, the web application must maintain a persistent connection for the user who authenticates correctly, but with the characteristic that while the session is active (5 minutes maximum) it cannot accept other users. I need exclusive access to ther server in that moment.
The application is replicated on five servers and I do the load balancing between them with haproxy.
The idea is that haproxy creates a persistent connection by adding a prefix with the server-id to the application’s sessionid to have sticky sessions.
So far everything is correct.
The problem is that new requests from users can go to the server that is serving an authenticated user and, although the application controls exclusive access and would reject it, ideally, haproxy would not send requests to the servers that are busy.
Is it possible to create rules that, knowing which servers do not have persistent connections, take new requests to them and only to them?
If all the servers were busy, it would not matter which one responded to the requests.

It would be very useful for me to be able to consult the number of entries in a stick-table filtering by server_key

Thanks in advance and sorry for my English