DS9 had characters that made mistakes and faced situations that couldn't be resolved by inverting the modulation of the deflector array. It was fairly tame stuff for the first couple seasons but really took off after the Dominion was introduced and the show became a war drama. By the end of the series characters died, were crippled, were left emotionally broken shells. Worlds were saved, worlds were left in ashes; Nobody won. That's a much more compelling drama than one where the cast always does the right thing and solves the problem of the week in the best possible outcome for everyone (except those who are opposed to the righteous philosophies of the Federation).
TNG was at its best when it focused on the wonders of exploring the universe. DS9 did a much better job with the realistic hard choices life will still offer us every day, even in a Star Trek future.
Edit: And B5 was one of the best Sci Fi shows ever made, you just had to slog through the terrible acting and special effects of season 1.