It should be doable.
Are the server's VMs? If they are VMs you could probably set time limits on the remote desktop session.
It would also be OS dependent.
If you are provisioning a fresh OS for every session, i believe it should be.
Windows:
https://www.ryadel.com/en/remote-des...s-server-2012/ Planning and Deploying Session-based Virtual Desktops
Azure, AWS, GCP make it easier.
I think AWS announced MacOS instances recently, so you can create broad availability of server types to provision.
user account in your app db -> user account on a server -> data & applications states are provisioned at each creation -> you can manage access via the app and AWS/Azure code ( firewalls and combination of simple shutdown/startup of vm instance ).
You could probably programmatically set these.