FWIW, in the script for "In Thy Image" for the aborted "Star Trek Phase II" series that evolved into "Star Trek: The Motion Picture," Decker is a Commander is pulled from commanding his own ship (a destroyer, called the Boston) to serve on the Enterprise. Similarly, several other destroyers in the script have Captains that are explicitly referred to as Commanders.
Further, in DS9's "Second Sight," it's possible that the Nebula-class Prometheus was commanded by a Commander, as no Captain was shown. Data also previously commanded the Sutherland temporarily in "Redemption" as a Lieutenant Commander and was addressed as Captain.
I don't see a problem with there being Commanders or Lieutenant Commanders in charge of smaller starships. It's the way of the real world.
And, regarding TOS, the issue of the rank braid is only IMO made dicey by the fact that Spock wears two solids and in one episode is referred to as "Lieutenant Commander" while wearing those braids. We never officially hear that he's gotten a promotion, so for all we know Commander Spock was Lieutenant Commander Spock all along and Kirk was a Commander who was properly addressed by the title of Captain. This would, of course, bump everyone else down a notch and indicate the liklihood that we never saw a "real" Captain, who would have worn three solid stripes.
This might also (coincidentally?) jibe with the fact that TOS was inspired by "Forbidden Planet" and the fact that the C-57D's CO was a Commander too...