Consumers have the option to "refuse" products from irresponsible or predatory vendors: ones which brick or obsolete devices.
Vendors should at a minimum open source APIs for abandoned hardware and allow unlocking it. "Refuse" to buy from those that don't. Ask for legislation forcing it.
I have a wonderful old ipad mini that's useless. I'd love to jailbreak it and put my OS on there but Apple wants a new sale instead.