I don't know if I'd say 5-10, but there's definitely a sweet spot. I really like this type of game in the abstract, but lately I find I can't find the will to power through the first few hours of "my mage misses with Magic Missile, my warrior misses with a sword, my mage fails to cast Magic Missile, my warrior misses with a sword, my mage hits with MM but the damage is 0, my warrior hits, the rat is dead, 1 XP, 1 copper piece"; and indeed, after a certain point this type of gameplay just doesn't lend itself well to play on a computer - fighting a big bad should be more interesting than boppit click-on-the-skills-as-they-come-off-cooldown. And I don't mean "make it harder so you need the exact right combination and balance of buffs" but "it shoudl feel fun and powerful".So I guess Baldur's Gate 3 won't go much beyond level 10 and I feel like I'm in the vast majority that prefers that. Make the levels take longer so we can enjoy them more. Gasp, shock, D&D is it at it's best between 5-10 and always has been. That's when the mechanics are 100% at their best.
If you want to play a CR 40 demigod go play Pathfinder: Wrath of the Righteous. The late game is a slog of 2000 buff spells, 2000 debuffs spells and summoning dozens of minions at a time in real time combat that is nearly impossible to control or turn based combat that even turned up to max speed is teeeeeeeeediously long.
Look at the toolbars of these characters in the late game boss fight, not really gonna spoiler that because he's introduced in the opening cut scene and is as close to a god as it gets in Pathfinder without being one so obviously he's an endgame threat.
Perhaps it's nostalgia, but I feel the older BG/NWN games and KOTOR and such managed to find a better balance and stay in "the zone" for longer than modern games.