That the Federation is implicitly presented as having such serious flaws seems a misstep - this isn't one of the deliberate moves to apply a more cynical eye to the UFP the way DS9's finer episodes often do, this seems like a mass character derailment for the sake of a story.
Well, I don't know that it's a misstep, really, in the sense of "unintended." Part of what would explain Red Squad's behavior is a misguided sort of "Captain worship" that young people in starfleet might plausibly tend to suffer from. Of course, generally in Trek, "Captain worship" is seen as a good thing.
So, I tend to see this episode more as one of those cases on DS9 where there is intentionally a more cynical take on some of the core Trek tendencies, such as "being bold," "glorifying/deifying the Captain," "daring to attempt the impossible," etc.
I don't think it's a great episode, though. Some of it is just a little too obvious and overdone. And, while there is some attempt to salvage a little ambiguity at the end, I actually think Red Squad, and their captain especially, needed to be more sympathetic for this to really work. Or their failure needed to be a little less obvious/complete.
It's also hard to build an episode around the death of a bunch of throwaway characters.
So, it has its merits, but I don't really like it.