As I recall, the UFP could have beaten the Cardassians militarily, but the council was more willing to appease than fight.
On rThe current military being confused, we have current leaders who do not understand our purpose and forget our missions. The navy was rebuilt to take the fight to the Barbary pirates, yet we now have an admiral who doesn't think we can get involved in Somali piracy. When the Iranians captured the British sailors, instead of expanding freedom of navigation exercises, we drew new lines miles outside their illegal claims and couldn't sail inside those new lines. We're more worried about hearts and minds than being able to fight, we totally freak over urinating on dead enemies, and yet give the enemy a pass on beheadings, castrations, and mutilation of our dead. Our generals are more worried about supporting a political narrative on sex crimes in the military and showing training metrics than actually doing anything concrete about it. Most forms of discipline are now illegal or restricted to senior officers. I had more authority as an E-4 than as an E-6. We failed to heed Heinlein's warning about pt norms and political correctness.
I say all that to illustrate a military that no longer thinks like one, not to argue those specific points.
Oh, and many oceanographic research ships are also electronic intelligence gathering ships; the soviets weren't alone in hiding behind "civilian research" flags.
Roddenberry expressly used modern US navy structure to make it easy for the audience to grasp, but the situation was based on Hornblower: no comms, diplomatic authority, the ability to start, fight, and negotiate an end to a war all before home even knew about it, exploration, etc.