There are a lot of good responses. I agree that the classic sitcom can’t stand much continuity, given that it’s inherently more gag-driven than character-driven, a modern commedia dell’arte form with broad “types” getting into contrived circumstances. Putting that concept into a world where actions have consequences and characters exist from week to week with no reset button would turn it from silly comedy into the psychodrama of deeply damaged individuals trying to function in a world very unlike our own.
This I disagree with: TOS would have worked better with more continuity, because the core characters were strong enough to stand it. Kirk, Spock, and Bones could have been developed, and they could have been improved by that development, in contrast to the classic sitcom characters whose characterization was so gag-driven they flat-out wouldn’t work if they were developed.
Plus, the lack of continuity forces, as you say, a cookie-cutter approach to episode writing, where every episode is mostly similar and there is no chance of dramatic tension because the audience knows how everything must end.
Finally, forgetting every new thing from episode to episode makes writing more boring: No new elements can be introduced, no new solutions can be tried, just transporter, phaser, photon torpedo, shield, and maybe a few one-offs specific to that episode. It, again, forces lazy writing.
I agree the “X-Files” was terrible with its mythology, but I don’t think the sins of Chris Carter mean it wouldn’t have worked better as a pure monster of the week show. In other words, an “X-Files” without the myth arc it had would have been better, but an “X-Files” with a good myth arc would have been even better than that.
I also agree that DS9 was a good show, and a good show concept, but I still long for the “five-year mission”-style Trek with DS9-style continuity. Voyager should have been that, but instead we got Warp 10 salamanders.
I’m fully in favor of anthology shows. Some of my favorite shows are pure anthology shows, such as the original “Twilight Zone” and selected episodes of the 1980s revival and the original “The Outer Limits” and selected episodes of its revival and even cheesy favorites like “Tales From The Darkside”; they’re the short story compilations of the TV world.