I agree that a DM should challenge his players. However, some ways of challenging are (IMO) better than others.
I personally tend to favor giving the players secondary objectives in addition to simply defeating the monsters. For example: running a gauntlet of monsters while staying ahead of an advancing wall of magical fire; encountering monsters enhanced by a magical effect and choosing to either focus on fighting the monsters in their more powerful state, or attempt to dispel the effect first; fighting on a sheet of moving ice that threatens to drop the PCs over a ledge (this is especially interesting when combined with monsters that slow or immobilize).
Alternatively, I could simply increase the challenge level by using a higher-level by the book opponent or advancing a by the book opponent to a higher level.
I try to avoid simply negating the PCs' abilities by using either monsters with specific immunities or environmental effects that shut down specific abilities (the latter was more common in previous editions - anti-magic zones being a prime example). This is the sort of challenge which tends to annoy me most as a player, especially if it gets used frequently.
I don't shut down their abilities unless it is an abiilty that shouldn't be in the game. I don't like abilities that have a high percentage of working and turning an encounter trivial. I don't think games should have abilities in them that work 100% of the time and are not counterable.
When you have an ability that works if the creature fails to resist, then you can control the amount of resistance for the various creatures so that you can make an encounter more difficult or less so. You do not want your BBEG being defeated easily or he really isn't a BBEG is he? If it was easy to beat Dr. Doom, Sauron, of Voldemorte, then they really aren't a BBEG. Their the path LBEG (Little Bad Evil Guy) that wasn't really a threat, it was only a matter of getting to him to kill him. That may work now and then, but certainly shouldn't be the norm.
The BBEG should make your players feel like they were in the fight of their lives. You want to DM so well the players fall in love with their characters. And then you want to make them feel like they are fighting for their lives when they face that ultimate villain driving the adventure along.
I use the tactics you recommend on lesser encounters and occasionally on main encounters if I want an added element of danger or uniqueness.
But if you're not designing BBEGs to be knock down, drag out fights, then that BBEG doesn't deserve being called a BBEG does he? An enemy has to live up to its billing. Or it isn't much of a story is it.
And a BBEG won't live up to his billing if your players wander in there, stun him multiple times, no one really gets even close to losing their life, and kill him fairly quickly with ridiculous ease never even tasting their own mortality as they battle an evil so powerful, so wicked, so threatening that it is capable of destroying towns, cities, nations, and worlds. What kind of weak BBEG would that be?
And as an aside, no way am I ever running a dragon no matter the system or rules where the players destroy it with ease because game designers gave the players powers that make the game too easy. That's not happening in my games. 1,000 plus year old dragons will always be well-prepared for dealing with adventuring parties as they should be. Dragon and demon lord killing isn't meant to be easy.