Yeah, unfortunately a lot of useful information is hidden in these discord groups these days. I’d much rather see stuff like this posted and discussed on the fediverse. I used the discord to gather the necessary information and then shared the write-up back there initially.
This was also my motivation for investigating this. With a script like the “enable-screens.sh” you can do runtime reconfiguration of the virtual displays. Apparently this only works if the kernel is not in a “lockdown” state. So this would depend on the distribution. And you have the “Switching the screens” section. It describes how to set up an application in Sunshine so that when you connect one screen turns of and back on again when you disconnect. I hope these two points fit your requirements.