Well, Kirk wore the two solid braid of Commander when commanding the Enterprise
in "Where No Man Has Gone Before"!
And before you yell "different systems!", let's remember that the Starfleet braid system was basically exactly the same as the later regular TOS one in two prequels: ENT (for those uniforms that had braid rather than pips), and STXI (for both the 2233 teaser and the 2258 main action scenes). Why should it change into something else for the duration of this episode, in in-universe terms?
I wonder how he managed that.
A torpedo boat is a tiny little thing: Kennedy had just a dozen underlings of whom only two were commissioned officers (Ensigns both). Junior Lieutenant was more or less standard fare for commanding that type of boat, except perhaps for the most prestigious formation-leading boats (some of which were equipped with radar and had larger crews).
Papa Joe may have paved the way for John F. by helping him pass the medicals despite his well-known back problems, but AFAIK the assignment as such was not out of the line for a competent young officer in wartime.