The "simple" answer is to handle these issues long before bankruptcy, with right to repair laws. It is not actually simple of course.
I don't think it would be unreasonable to mandate software for hardware products be pluggable in such a way that you can modify the runtime with hooks.
During the commercial, supported life of the product the consumer doesn't know any different. But at EOL, repair shops can make a market for "modules" that can do things like change the remote server a IoT device talks to. Removes requirements for DRM, fixes bugs etc.
Threat to commercial interests is really low here in my view, an average consumer pays for a product and pays for the SaaS portion because its convenient and provides value. Then the product reaches EOL and the aftermarket takes over. No different to say the long, exhaustive use of used cars (at least in the decades prior to digital integration in cars, it remains to be seen how the next two decades go re:software services ridden cars.)
I'm 100% behind right to repair.
But repairing hardware can be tricky (we've made hardware where the CPU got discontinued) - and of course repairing parts that contain firmware us another layer of hard.
As you point out mixing software and hardware (aka firmware) makes repair more-or-less impossible.