I think that should be possible.
Basically you want to adjust the window capture sources settings to switch to whatever discord window you are currently focusing (and then also change some scene item visibility stuff)
Hopefully I understand what you are trying to achieve correctly.
You will have to use the "Source" action type to modify the settings of the window capture source.
The most straightforward way of doing this is to simply create X number of macros similar to this one:
View attachment 95687
(I am of course just using notepad as an example here)
You can also get fancy using variables and handle the settings change for any amount of teams in a single macro, but I am not sure if that is the best approach for your setup:
View attachment 95688
Let me know if you have questions!