The most sustainable thing we could do for web capable devices is to make right to repair mandatory and include in that driver specifications required for custom software/firmware. e.g. an old iPad is now obsolete, but it may work fine it just can't connect to modern TLS and doesn't trust new root CA certs.
If it was possible to updated old devices with any custom OS, many devices would continue to work instead of being disposed of.