It’s quite sad that Google never figured out a way around this issue. The real problem is that they push the responsibility of updating to OEMs, which have no interest in updating their “old phones” (1 year old in most cases) because a new shiny one has been released.
I think the only way to really solve this is to make Android like Windows used to be back in the XP days. OEMs get a base system and they can customize it to their hearts content, but the updates to the base always come straight from the OS developer, no matter if the “OEM customizations” are ready for it or not.
Even with things like Treble the updates still have to come from the OEM, so unfortunately I don’t see the situation changing any time soon.