TL;DR: Play Dark Souls/Elden RIng/Any FromSoft game from 2011 onwards
I pretty much "specialize" in doing big boss battles, and have put a lot of time into playing with them and making them work over the 9 years I've played 5E. In the end, letting multiattack be for ALL actions (not just some), giving the boss multiple turns, reactions, and very high damage have been what's made it possible. I also always use at least two phases, which sometimes is a second healthbar and sometimes triggers when bloodied.
The high damage and multiple turns are the most important things. Bosses need multiple chances to break out of effects and they need to be able to steal a player's attention by hitting them really, really hard. Hard enough to make the player's jaw drop. This is doubly true at high level, because it's easy to bring a PC back from the brink of death (or even back from death period) several times with max resources.
I used to believe you had to wear a party down to challenge them. I no longer believe that. All it takes is a really serious stat block that's played a little tactfully. Give it some bonus moves and abilities to make it interesting and not just a damage contest, as well as a somewhat interesting arena that changes either the phases or independently, and you too can challenge fresh high level parties with solo monsters.
For what it's worth, almost none of 5E's first-party, high CR monsters do the trick IMo unless there's about a gap of 10+ between CR vs Character Level. And you really need methods that can take a party out besides damage too, like threatening them with mutations if they get hit too much, or forcing their attacks to veer and hit other party members, etc.
All this together for a single monster creates a lot of chaos. You're darting around with legendary actions (more then usual), overcoming effects, doing insane damage, and inflicting weird statuses and other abilities on the PCs. It should feel frantic and desperate by the end; many times, even my veteran parties get down to just 1-2 characters with a handful of hit points and no resources left when they win. But, they win.