So I tested what the performance is like and it didn't seem too bad even in the original form. I had 100 switches constantly turning on and off and didn't see any huge performance hits (well, aside from the game recalculating all the network connections, but I can't do anything about that...).
I then tried implementing some of your suggestions and while the performance did increase, it was just a tiny bit, not really noticable unless you run the game on 4x speed or something. But it WAS an increase so I published a new version without the if statement (the rest didn't seem to really matter).
Anyway, enjoy and have nice day TRK