Success or failure in these terms is about money.
If they can't sell their advertising, because a show is not generating of maintaining a THE RIGHT sort of audience, then the powers that be will not play that show.
There's a number in dollars, which is acceptable that 1 cent less is unacceptable to maintain the pulse on a TV show no matter how "good" artistically it might be.
DS9, not that it lost money, did not make enough money to be seen as a success.
Neither did Voyager.
Enterprise was cancelled midrun, probably because it was losing money.
Hell, Enterprise did not earn it's final season for being good enough. Season Four of Enterprise only came though because there was enough foresight to consider syndication. Week to week Enterprise was a faliure. There was no immediate justification to have it on air losing money for another 22 weeks after season three. However three seasons is too small a bundle for syndication which means that they would lose out on billions over the next few decades if Enterprise was just shelved and forgotten about like every other unsyndicatable TV series.