If a module writer has "will the players enjoy this?" as a top-of-mind thought while writing, despite all good intentions that's probably going to lead to a bad adventure.
Hard disagree and you offer no justification for this claim. You seriously need to offer a detailed justification for a claim that utterly wild. Especially the "probably".
It's easy to write adventures and keep player enjoyment in mind, even when writing generically.
The author can't know all the situations the module will be used in, and ideally should instead be thinking "how can I best and most succinctly explain to the DM what is intended here?" and leave it up to the DM to make it fun for that table.
Nope.
If the module is designed without even considering whether it will actually be fun, the odds of it being a
completely pointless snoozefest (as many published modules are), go up by like 1000%, for the very simple and obvious reason that it was designed thoughtlessly and without any conception of real-world usage. It's the equivalent of designing an area in an open-world videogame without making any effort to make it playable or interesting. People absolutely do that - for sure - and the results are dire. Really bad. Yeah, you can't know the exact situations, but you can know the broad likely parameters, and as an experienced D&D DM, unless you're a terrible DM who isn't fun (which I doubt), you can guess what players are likely to enjoy, and what they're not.
That has to be in your mind, otherwise you end up writing an onanistic adventure which pleases you, the writer, but was not written to be played, just read by a DM.
This is a major and common flaw of adventure writers, as this thread discusses. Your line of thinking here is basically a big part of why so many published adventures are so bad, and why some standouts are remarkably reliably good (because they did think about how players would respond).
To be fair, adventure modules really ought to be written with the DM's needs in mind rather than the players' needs; as it's the DM who has to interact with said modules in order to run them.
That's totally different from "let's ignore whether stuff is likely to be fun". You write so the DM can run the adventure, that doesn't require you to stop thinking about how players are likely to react. Indeed, if you're not thinking about how players will react/respond/enjoy/dislike stuff, please don't write and publish adventures! Or put a health warning on them, like "This is for the DM, your players might well think it's terrible, I don't give two shakes of a lamb's tail!". All the worst adventures I've ever read/run/played were written by people who didn't think about or care about how players would react, and all the ones which I see as "ol' reliable" or the like have at least some consideration of that, and make allowances for it.