This specific example,
https://jsfiddle.net, is
not a monopoly and has many suitable replacements (e.g.
https://livecodes.io/,
https://liveweave.com). While in some cases (like YouTube vs alternatives) there are clear advantages to the former, in this case I don't even think that holds (I imagine most people only use JsFiddle to interactively build client-side webpages then share them via a link).
That people pay for JsFiddle (although do they? Maybe this is another "unprofitable" company) is a testament to...the fact that humans are not rational actors. Even in a "perfect" (competitive and easy to enter) market, a brand's quality can tank and they'll continue to get sales, despite objectively superior alternatives, simply because of brand recognition.
I doubt regulation can solve this. Try to imagine a ban on "enshittification". How do you measure it? How do you enforce it? How much does it cost to measure and enforce it? What if a company has "enshittify" because they're losing money? What if that company deliberately entered the market losing money, to gain brand recognition so they could recoup via "enshittification" later? What about small would-be companies that decide not to enter the market because this regulation is too complex and potential consequences (they think may someday apply to them because it's so complex) are too severe?
Instead, I believe the best solution is to try to be a smarter consumer yourself, and convince others to if possible; and if you can, start a company where you deliberately try to maintain quality even though it will sometimes directly contradict increasing profit (because humans aren't rational actors, enshittification won't lose you too many customers; and yet, there are companies that seem to avoid it and still make $millions+).