Had a thought, reading this thread and the numerous similar threads. Two simple fixes that require no new rules, but are endlessly tweakable to your (or your DM's) taste:
1) Full casters do not get HP or HD after 5th class level.
2) There are no "spells" beyond 4th spell level. (You still gain spell slots.)
Full Stop.
As stated, this is fully tweakable, moddable, caveats, etc. For starters, draw "the line" for #1 or #2 wherever you want. I put 5th level for HD to represent the top of "normal" (mundane?) health, being also where every class becomes a powerhouse. I put 4th spell level because it's one shy of raising the dead and teleporting across the planet, but maybe you choose 5th spell level for exactly those reasons.
The first two tweaks that I would probably use:
* Spells above "the line" still exist, but they are Rituals. Up to the DM how much more costly or difficult the Rituals are... skill checks, more time, more participants, etc. "Come on Kiki, get that tree portal open!"
* If you get a bonus spell list from your class, you still have access to those spells as spells. The Life Cleric can still do a mass cure wounds in combat, and always has access to raise dead; the Aberrant Mind Sorcerer still gets telekinesis.
Other thoughts that instantly spring to mind:
* Hybrid casters: If your class/subclass is not a full caster, but gets spells, reduce your HD size one step after 5th class level. I.e. EKs and Paladins get d8s, Arcane Tricksters get d6s.
* Slower HD progression: Instead of "full HD until 5th, then nothing", maybe do "only get HD every odd level, until you have 5" (i.e. at 9th).
* Spell Failure: Maybe you implement the numerous ideas for spell failure on these forums, but only after a certain point.
* Upcasting Options: Maybe, akin to sorcerous Metamagic, you give a few bonus options when upcasting. The 11th level Wizard's fireball cast with a 5th level spell slot, still does 8d6, but has a 25' diameter. Just to give further spell progression some extra meaning beyond "more power".
* Higher level spells take additional time (not "Ritual level time", but like 1 Action/round of casting per spell level).
* Variable Proficiency Bonus. I.e. Caster class levels don't increase your PB with weapons; hybrid martials give up some PB progression. (i.e. PF2e, or old 3e Attack Bonus progression that favored the warriors)
Anyway, the idea with this is that maybe martials are already in the "sweet spot". The Fighter attacks the dragon four times with his sword, and facetanks the 80pt breath weapon; the Wizard will melt in that blast, so he takes cover then responds with another buff to the party. The Fighter's "job" never expires - the casters will never be able to match the durability and capability of the martials, but their spells still are powerful and versatile. The Fighter can't fly, after all, or incinerate a dozen bandits (and their horses) as a single action... but he also won't be dropped by a single arrow getting through his defenses!