I'm wondering for some time now, if it wouldn't be better to define a new terminal standard from scratch. Something that can be automatically detected and switched on once both the application and the terminal emulator support it.
Instead of adding extension over extension on top of some old protocol. And using a lot of hacks to get stuff done.
And while we're at it, a better TERM variable, not the "user-agent header" of terminals that it is now.
To be more precise, TERM contains a single name, a key to index terminfo, a database of all known terminals and their capabilities. It assumes that such database is up to date and that every app has access to it, which is not always true, especially on non-unix platforms.
However, apps have begun using the name "as is", comparing it against known strings, e.g. "xterm", which led many terminals to advertise themselves as xterm just to ensure compatibility with existing apps.
A truly meaningful substitute for TERM would be a "semantic TERM", a variable that, setting apart the name of the terminal, focuses on the capabilities it offers. Not the complete set of properties listed in terminfo (we can give most of them for granted, today), but just the subset that differentiates modern terminals, like colors, kitty's protocol, OSC133, and a few others.