His first example would be best as it prevents the entire event from firing in the first place.
on !*:DEOP:#:{ commandset }
or have 2 events if you have commands you wish to execute for both.
on me:@*:DEOP:#:{ commandset 1 }
on !*:DEOP:#:{ commandset 2 }
You could also halt your own deops in one channel alone and process them as normal in other channels.
on me:@*:DEOP:#channel1,#channel2,#channel3: halt
on *:DEOP:#:{ commandset }
In any case, these are all reactive events, not proactive
protection. There is no such thing as
protection from these kinds of events; only prevention and reaction.