Imagine not so long in the future if self-driving cars were forced to reveal their code because of the right-to-repair bill, 1. who without a vast depth of knowledge in C++, etc. would be able to go anywhere near it? 2. even if they did is it in their best interest or anyone else's if they tinker with the code and made the car take undesirable actions? Maybe buying a tractor should be replaced with leasing tractors,…
The circumstances are in no way new and don't merit new rules or expectations. What is actually new is increasing legal and technical roadblocks to self repair that enable manufacturers to design hardware that is worse for nearly everyone and better for their bottom line.
These markets are full of entrenched players who all have an financial incentive to make anti consumer choices so expecting a free market fix is probably laughable. The only real solution is the hated "regulation" where we seek individuals who are subject matter experts without financial incentives to dictate that people must do what is best for everyone rather than their bonus.