Or, legally require vendors of general compute devices to provide a common SW-layer with respective documentation, to allow utilization of underlying hardware (not explicitly within the shipped OS, it can also be a separate maintained platform disconnecting the device from the shipped ecosystem).

This would prevent e-waste and put this old hardware to better use. A community OS could then be built on top of this common SW-layer and be maintained for a wider range of devices.

I would e.g. LOVE a "Browser on everything" OS which just provides a Browser OS for outdated hardware, but the only way this could work on scale would be if the device-vendor would be mandated to provide and document the lower layer...

Someone would have to make the economic case for such a regulation as well, i.e. demonstrate the benefit for society and reduction of e-waste if such a law is in place. But the chances for this are razor-thin, especially in today's public/political climate.