One option would be to allow the installation of an alternative OS only after the device is out of support at least for an image win but this might not justify the effort.
I hope this gets regulated in the future so manufacturers are forced to remove any locks preventing the installation of 3rd party software (even make resources available for developers) the moment they stop providing "adequate" support.
I would personally prefer one step further and force to remove all locks if the customer asks it, it's their device, they are free to do whatever they want with it, it's both the right approach morally but also for environmental issues.
They could but it would cost more than most users bargained for. Most likely a manufacturer would offer you the open device for the price of the device plus the expected loss of value from connected services (maybe something on top just for good measure), or a locked "subsidized" version that can or has to run only as we see today, and that will cost as much as one does now. And they could easily make a case for this even in court.
But once the support ends it's more or less implicit that the manufacturer abandoned the device and no longer expects profit (or expenses) related to it and keeping it locked is a harder case to make.
And I get a manufacturer's desire to profit from their own devices. But once they abandon them I see no other reasonable legal or moral claim a manufacturer can make. They should issue a final update that removes any protections, and make all relevant drivers and documentation freely available (or even for a modest one time fee) even if this means some binary blobs and a bunch of docs for how to interface with them.
This was, however, seen as outrageous, unlike the current state of smartphones, for better or for worse.
Most "normal" people see that a coffeemaker putting "DRM" on your coffee is ridiculous, but that outrage never really extended to digital devices for some reason.
Ignorance. If people had no real idea how coffee was made either, you wouldn't see much outcry over locked-down coffee pods either. "You want to grind your own beans? What an eccentric nerd! My coffee maker works perfectly with the manufacturer pods, why would I ever switch?"
Whereas the coffee is something they can buy at other shops, and it's pretty easy to compare.
That said, Apple has no incentive to work towards enabling this. Both Apple's profit and customer's expectation are in the vertical integration that Apple provides.
(I'm not in anyway saying iOS is not restrictive or that they shouldn't do it. It's just that there's no pressing reason for them to work towards achieving it.)