OTOH, when we next hear of General Orders and death penalties, the punishment has jumped over to GO4. For all we know, the constant discoveries of unimaginable horrors in deep space force the UFP to create specific death penalties (and possible other cruel and unusual punishments) almost monthly, and then abolish them as soon as the heroic Starfleet officers sort out the mess in question. Although never mind that - Starfleet officers have the mandate to kill wrongdoers without much in the way of due process, as demonstrated over several episodes, environments and eras. Khan would certainly fall into a category warranting deadly response, considering the villain himself used deadly force against Starfleet heroes (and let's forget for this once that Khan never actually killed anybody - he did appear to wish for Kirk to die in the depressurization chamber for real). Assembling a firing squad might be against regulations; pushing Khan out of an airlock with or without a pretentious "Oops!" demonstrably would not be.
Putting Khan back in the box faces technical and ethical hurdles, yes, but also tactical ones. Remember that Kirk found Khan
. Now how likely is that? He's drifting in a spacecraft so difficult to detect that Kirk's capable sensors keep him misinformed about every important detail until the very end of the teaser. The only reason Kirk homes in is because Khan has turned on the ship's come-and-get-me beacon! We should ask ourselves whether a clever and desperate fugitive hoping to reach a destination undetected would do such a thing... And whether a clever and desperate supervillain hoping to lure in victims would. We never heard of any "destination", but we did see a supervillain in smooth action against a victim successfully lured in.
Putting Khan on a planet would thwart his nefarious plans all right. As for going to check on him... Why? Starfleet never checks on colonies. Sure, (government-sponsored?) researchers get an annual health check even though they always complain and sometimes shoot to kill, but "civilian" settlements prefer to be left alone, and typically are not heard of for decades, if ever. Heck, even the apparently prominent Deneva, well past "settlement" status, could remain absolutely silent for a year and not warrant a visit.
Khan bitching about Kirk not bothering to write was just another symptom of his blaming Kirk for his own shortcomings and woes, real and imagined.
As for Kirk not telling Starfleet what he had done, well, nobody does that in the Federation. Again, just review those cases where Kirk eventually does pay a visit to a Federation colony, installation or outpost, and stumbles upon something that has gone utterly unreported for ages. Clearly, keeping of truthful logs is at the captain's discretion...