I don't disagree that the BBEG is going to have defenses and such, I am just saying that in my experience a half dozen players with a broad array of high level PC abilities are generally pretty good at finding solutions when it's just me sitting on the other side of the screen. I generally do not like fiat countering as a GM (i.e. just inventing things to stymie the PCs at every turn). Rather, I'll decide villain X has defenses Y in place, and then leave it up to the PCs about how to deal with those things. Sometimes they draw the villain out. Sometimes they summon an army of umber hulks to dig a tunnel into the basement. In any case, it is more common for characters of that power level to choose the time and place of battle, in my experience, which has the effect of allowing them to nova. That in turn means I feel like I need to make sure BBEG's are extra powerful to make them an interesting challenge, but that can lead to "unfair" feeling situations if things go against the PCs.
So I guess what I am asking is in high level games, what are some tools for making sure the PCs have had a few resource draining encounters prior to those set piece showdowns? I like letting them feel smart and strong, and I like challenging set piece battles, and I don't especially like grindy fights meant to chip away at their hit points and spell slots, and all those things feel kind of opposed.
I'm currently running Book 6 of Rise of the Runelords for Epic-20 5e PCs. It features a lot of 'gating' where the PCs have to work hard just to get anywhere near Runelord Karzoug, the BBEG. The whole point is to reach him in the extradimensional Eye of Avarice before he can escape.
I do recommend looking at the end books of Paizo APs. Their solutions are inadequate for high-magic Pathfinder but work well with mid-magic 5e D&D.