A General Order is an odd place to have such a specific death penalty in. If they use up the low number GO7 for the extremely specific case of Talos IV, how petty does GO16 get? "A Starfleet Officer shall not address Mr. Scott as 'Scotty' unless close familiarity spans 12 months or longer"?
It sounds more as if every GO carries the potential of death penalty in the "consequences for failure to observe" section, and GO7 is a general (!) order about planetary quarantine, with the specific case of Talos IV being the only one where the death penalty clause is active at the time of "The Menagerie". GO4 then probably concerns something equally general, such as rules of engagement, and some unseen adventure by some unseen captain and ship has resulted in that order's special death penalty clause having been activated for some specific offense after the GO7 thing got completely outdated by the events. Probably happens every six months or so in Starfleet anyway.
Of interest here is that our heroic officers have broad powers of use of lethal force, in all the eras and spinoff shows. They also appear to be the de facto law enforcers of the Federation, facing no competition from any civilian organization. Basically, then, death penalty can befall any perpetrator if the officer on the field deems this appropriate. This in no way contradicts Picard's statement that death penalty has ceased to be viewed as being a effective deterrent
- it's merely a convenient way to stop the perpetration and especially perpetuation of a crime for good.