I find myself with one of the campaigns I'm running coming to a close. As in close enough I can basically see the end if the PCs keep going along their current path, and we could probably hit it in one mega-long session or 2-3 regular sessions depending on productivity levels. This also means that I'm preparing encounters that will be the final encounters for the game as a whole. I've got my biggest, strongest, most capable bad guys to array against the PCs. I have all their assets, resources, and abilities. I have all their knowledge. I have their place in the lore, and how they would work. And the system we're using - D&D 5e - has a number of mechanics that could be used in their favor that would make some of the fights potential landslides.
There is only one problem: those mechanics aren't fun.
Winning Is Easy
I've said this before, but winning is easy if you're the GM. If your goal going into a fight is that the characters you control will be the last one standings, you can do that as the GM. You control the rules. You arbitrate the rule challenges. You can over-rule or change anything you want as you want it. There are rules that govern how strong the player characters can be. There is no such rule governing what you can array against them. At best you have suggested guidelines. There is no reason you can't just make a group of monsters that are mechanically identical to the PCs just with all offensive and defensive capabilities doubled or tripled or quadrupled as you desire.
If 'winning' the fight was the point of RPGs, there would be a lot more rules controlling what the GM can put in front of the PCs and there are games out there that do that if you want to play them.
Some Mechanics Are Fine For Players But Not For NPCs
Certain mechanics are very powerful for the utility they provide. A fireball is a big spell, but at the end of the day it is just damage. Hold Person or Banish on the other hand will not kill someone but they will take them out of the fight. Now when a PC uses an ability like banish on an NPC, and when an NPC uses banish on a PC there are different affects on the game. Most notable of these is that casting banish on a PC removes a player from the game. Casting it on an NPC removes a character from the game.
See, when you hard crowd control a PC you are not only locking down the character but you are making it so the player can no longer play the game. They become a passive witness unable to interact with the world. Even worse, they do this at a time when the game is at its slowest going. A combat round in D&D is 1 minute. It is not uncommon for it to take 30-60 minutes of real life time for that 1 minute to be resolved. And when your character is locked down for 10 rounds....that's a lot of game time you don't get to do anything with.
Now some tables are fine with these mechanics, but it is the rare player - and the rare group - that will still be having fun as they get to sit their not playing the game and watching as their friends struggle to continue a fight now a person down. Add to this that 1 PC being down means less split up of attacks, and an ability like hold person, stun, or banish is basically kicking the death spiral off nice and quick. Which just makes things even harder on the person who can do nothing but sit there and watch.
Combat can be distracting and lose players when everyone is involved. Imagine how distracting and hard to keep up it can be when you're not even in the game?
Encounters Should Be Fun
Which brings me to the crux of this. When making your encounters you should be aiming for fun. You can be challenging. You can have a real chance for the PCs to lose. But you don't want the Players to feel they never had a chance. You don't want them to feel like they got locked out of the game and couldn't do anything to help or fight.
You want them to have fun.
If they have fun, they'll be more ok with losing and even dying. If they have fun they'll remember the encounter, the enemy they fought, and the game it was in.
If they have fun, you're running a good session.
Interaction Is Fun
What makes an encounter fun? Several things, but one of the best ways I've seen to make things fun is to make them interactive. There is a reason JRPG's sometimes get panned for their combat system being 2 groups in a line taking turns hitting each other. It's not really interactive.
Play and counterplay is what you're looking for. You want characters moving around. You want to give the PCs mini puzzles and strategies they have to work out. You want to give them a reason to change their default "I walk up and stab it" to something else, and in turn you want the NPCs to react to the PCs.
Oh, and if it isn't clear: the idea here is to get your players more into the game. That means you want to leave mechanics like banish and long term hard stuns as out of it as you can. Or give the players clear ways they can unlock their friend from the stun and get them back in the game.
Focus on fun first. Then work on the challenge. Then check to make sure it is still fun.