Re: most "wrong" episode...
Later Kirk escapes from them, calls a truce, gives them aid, calls them friend and sets course back for home without any mention of bringing the aliens up on charges.
You seem to forget the Kelvans still have an impressive tech edge over the Federation. I doubt the Federation could really keep them locked up if it came right down to it.
"...the most elementary and valuable statement in science, the beginning of wisdom, is I do not know." - Lt. Commander Data, "Where Silence Has Lease"