This would definitely require a custom plugin to enable as it isn’t possible out-of-the-box.
Unless you want to set it such that you make it hard to achieve the min trust to send messages and set your active group to give people that minimum trust level for sending messages, so that once they are removed from the group, they lose that trust level and thus lose the ability to send messages. This workaround should work, but I haven’t tested it.