Is weapon switching allowed in the game? Is it against the ToS?
1. You have input queuing which lets you switch weapons as soon as the attack animation is done ( not on guns anymore after the gunner update )
I think that this is designed deliberately to make the game feel more responsive.
2. Shield Cancel
The shield can be used to cancel the "return to normal stance" delay before you can attack again, assuming you don't want to use the full clip or combo. It can also be used to cancel the animation for switching weapons as that goes back to the "return to normal stance" as well.
Shield canceling makes input queuing on guns possible again.
I presume this is an intended feature, to make the game feel responsive while in combat so you can immediately shield for an on coming attack after attacking.
There is more evidence that this is intentional as using the last hit of a sword cannot be canceled but every other attack in the chain can be.
When you put the two together, you get both single and double switching.
Quoting Cronus from this forum post "I'll look into changing that back since we like to encourage people to post Spiral Knights videos as much as possible (provided they aren't posting content that violates the TOS)."
Also, will I be banned for uploading or having uploaded videos that contain it?
Will I be banned for posting how to do it here?
If it's not against the ToS, will the developers/GM's encourage us to do it or is it a grey area?
How is weapon switching illegal in any way?
The thing Cronus is referring to in your link is a copyright takedown through youtube's automated music copyright system. The music within Spiral Knights is copyrighted and therefore was picked up by youtube's algorithms.
Weapon switching/shield canceling are advanced fighting tactics - everything involved with them is perfectly fine. The only time you would be breaking the ToS by using weapon switching/shield canceling would be if you programmed macros to make you perform them better than you could naturally - ie, perfect timing alchemer switching. As long as you're doing everything yourself, all is good.