@James Learmonth
My oh my! I had this very same question quite some time ago. I could go really deep into this, but essentially, yes you can - I have built a lot of automation around going on/off queues, group membership etc.
While I don't use a trigger for it, I use workflow/automation and the genesys cloud APIs to achieve the same result essentially.
Wihtout going into a huge amount of detail - in the use case I have, we have agents that are multiskilled and we have them on ALL queues and brands. Once they get a chat from brand A then we don't want others from brand B C etc to come in but want them to receive more from brand A. How do we do this? Well, we use a trigger on user.conversation to fire a workflow that looks at a bunch of things like current chat counts, which skills they have, which groups they are a part of (And have groups linked to queue membership) and then do a bunch of moving around based on that.
Eg below is that flow, but we do a lot more for other things and could be easily tweaked to do things based on a schedule and not a conversation inbound.

------------------------------
Lawrence Drayton
------------------------------