The problem is that, like most libertarian ideas, this just doesn't work in the real world. There's a such thing as "barrier to entry", so for something like a really simple smartphone app, this kind of thinking works decently because it's easy for a college student to code up an alternative program in his spare time, but for something like a giant piece of farming equipment, there just aren't many companies able and willing to jump in there, and put up a ton of money and then develop a good product fast enough to overcome the incumbents' first-mover advantage and inertia.

In short, if this theory actually worked, someone would have already done it. Instead, large established incumbents are mostly moving to this kind of behavior, because it's more profitable for them, even though it screws over their customers. When the customers have no viable alternatives, the customers aren't going to stop being customers. This is basically why we need laws for things in the first place: you can't trust people to act in the best interests of society (they don't: they're greedy), and the real world is too complex for "the invisible hand" to solve these problems through competition.

A good example of all this is Tesla cars: some people have been screaming for electric cars for decades, even resorting to building their own. The incumbent automakers did some half-assed attempts, mainly to please regulators in California, but never invested any serious effort into it. So finally an independently wealthy guy comes along and decides to make his own car company. (And even here people have a lot of complaints: Teslas are extremely locked-down and they'll threaten you for plugging into the Ethernet port.) Building a modern car just isn't that easy, even if you eliminate the gas-powered engine, and not many people or companies have the resources to jump in and have a go at it, so competition is naturally limited.

So yes, a legislative solution is highly desirable IMO. We've been down this road before: carmakers refused to honor warranties on vehicles if they were repaired or maintained outside of official dealerships, or with non-OEM parts. This necessitated passing the Magnusson-Moss Warranty Act of 1975, which forbade this practice, and only allowed manufacturers to refuse to honor warranty claims if they could prove that an owner's modifications or use of improper parts directly caused the problem. There is also a "right to repair" law in Massachusetts, which forces the aforementioned Tesla to make available factory repair manuals in that state (at a ridiculous cost though), but they only make them available within that state, and no other. What we really need is a federal law that goes much further than MA's law. Small business is the largest employer in this nation by far, and independent repair shops are being forced out of business by these consumer-unfriendly practices. The right to repair isn't just for end-users, it also gives end-users the ability to benefit from competition among repair shops, something you don't get if you can only go to official manufacturer shops. Anyone with libertarian leanings should appreciate this, and the benefit to small business.