Hi, a topic close to my heart. I feel this is perhaps my greatest weakness as a DM. People will always give advice on how DMs control the world and should know the PCs and and players and their abilities. But what is often overlooked in these discussions is that when running games for very experienced, tactical players, 4-6 heads are better than one. I often find that that side battles and random things that happen on the way to the boss battle are more interesting. I feel in my games the enjoyment is more from the journey along the way to get to the boss battle, than the boss battle itself. I'll give three examples of campaign ending boss battles.
First D&D 5e campaign, and first TTRPG game a ran in over 20 years, having been out of the hobby since the very early 90s.
It was a 1-20 level homebrew campaign in a homebrew world. It was a dracolich with a number of powerful caster minions, a Rakshasa and a good number of mooks. None of the party went down. They did feel seriously threatened at the start of the battle, but after some good tactical choices and good roles it quickly back apparant that the battle would go their way. I don't recall many of the details of it because it just didn't stand out as one of the highlights of the campaign, which bothered me at the time. I remember it being an exhausting combat to run and that 20th level D&D players just had so much power that it was difficult to plan a challenge (at least for me at that time).
My next campaign was Curse of Strahd. I needed a break from homebrew and creating everything myself and I really like Curse of Strahd. It was a great campaign, except for the final confrontation with Strahd. Where I perhaps went wrong is my strong desire to run it it as written.
I place Strahd according to the Taraka divination at the start of the adventure. The players had found the model of Castle Ravenloft in the Amber temple. They found a window that they would try to enter from instead of trying to come in through the main entrance. It happened to lead to K88. Tomb of King Barov and Queen Ravenovia, where the Taraka diviniation placed Strahd. So they come crashing in through the window, surprising Strahd and themselves.
The battle itself was intereing leading to an interesting hide & attack sequence through the catacombs. But Strahd had no minions with him and the party was at the upper levels for that adventure and had brought a powerful supporting NPC they had made an ally along the way. The downside was that they never had to make their way through and explore the castle, so I felt I deprived them of one of the main highlights of that adventure and it would have been much more of a challenge if they had to explore the castle and find Strahd. I probably should have just selected another location for Stahd as soon as I knew their plan but that goes against how I like to run my adventures. I roll in the open, don't fudge rolls, and like to let the story emerge from PC actions rather than curate and change the adventure and outcomes unless there is in-world logic to do so.
My last campaign that I wrapped up at the end of last year was a Rappan Athuk campaign that lasted 5 years. I wrote a very lengthy description of it here:
https://www.enworld.org/threads/tho...geons-in-general-spoilers.697433/post-9208972
The entire encounter lasted 16 hours. It was a gonzo 20th level D&D encounter. The fact that it played out so long might sound terrible but overall it was fun. I don't think that it was as deadly as it should have been, despite my putting a lot of thought and prep into it. But that was the result of a great deal of planning, which in a sense started five years ago when we started the campaign. The players were rewarded for their years of preparation and accomplishments by turing an unwinnable encounter into one that they were able to win mostly unscathed. There are some decisions I would have made differently, perhaps, but, overall, it was a fitting end to a very long campaign. I go into great detail about it in the above-linked thread.
Our next campaign is Warhammer Fantasy 4e. We are looking at a change for D&D. I also think that WFRP4e does a much better job at keeping combat dangerous at high levels. Even when that players seriously outclass their opponents, the rules of Warhammer make it so that a good or bad roll can seriously f' up a PC and combat should never be entered into lightly.
Hope that is what you are looking for.