I've just finished watching DS9. In an age of streaming the multi-part episodes and longer story arcs work brilliantly.
I've not seen all of Enterprise.
I know TOS, TNG and Voyager quite well.
...
As to the quality of the writing, my observation is that it often took the writers 3 seasons to work out what really worked for the show, the cast and the characters.
For DS9 it was the introduction of the Defiant and the Dominion and the more frequent use of longer multi-episode story arcs.
For Voyager it was the introduction of 7 of 9 that transformed the show and marked a change in how they approached the gamma quadrant.
For TNG it was the Series ending cliff hanger where Picard became Locutus of Borg. From that point forwards they had a settled cast (including Gates McFadden as the doctor) and the characters and relationships were given more depth.
...
On a separate but related note, watching these shows now, it is also clear other factors affected the scripts that aren't often acknowledged. That includes the demands of the actors (to get them to stay in the show) and attempts to maintain popularity.
In the later series of each iteration, you will see episodes that focus on particular characters. For example, episodes that focused on Data, or Worf, 7 of 9, Paris, Miles O'Brian, the doctor and the captain (of the relevant Star Trek iteration). This is very often actor service. These episodes were often weak ones, especially if the character / actor didn't work for you.
For the cast of TNG, they were all directing episodes by the end. Some of them clearly enjoyed it more than others and did more. TNG cast members also directed several episodes of different iterations of Star Trek.
Each show also had recurring episodes, whereby the same story would repeat and (sometimes develop). Every season of TNG had a borg episode, a Kingon culture/Empire episode, a Q episode. Most had a time-travel episode
If you have to plan 24 episodes for a season having these sorts of episodes give the series a structure. 6 or 7 character episodes, 4 or 5 recurring villains or themes (eg time-travel), then you only need to write 10 or so "alien / space anomaly of the week" shows (each of which has to be completely different from the last one, but also exactly the same as all the others).
This writing formula was repeated for all series. As mentioned above, DS9 had the alternate universe episodes in every season, there was also one episode per season about the worm-hole aliens/prophets.
...
For those who are interested, there is also a documentary series called "the Centre Seat", which deals with the development of the various shows and movies, the writing challenges, the inconsistent contribution of Gene Roddenberry and the demands of the networks.
(edited to correct typos)