Silentwisperer recently created a video discussing the ideas behind mob switches, both global and local, and how you would create them in bedrock edition.
Do with this information as you may, but please use responsibly when playing with others.