Except Wesley was not an officer. He was a legal minor, present by consent of his parent on a planet whose government did not apprise the Federation of how its legal system worked.
If I go to Tijuana, it isn't up to the government there to apprise me on how the laws work.
Except that's not an applicable comparison, because the United States and Mexico have always been in contact with each-other throughout their histories.
By contrast, it is only common sense that if two societies discover one-another for the first time, they ought to disclose how their respective legal systems work before they start sending their citizens into the other's territory. Shame on the Federation for not thoroughly checking how the Edo legal system worked before allowing their children onto Edo territory -- but shame on the Edo for not telling the Federation that the penalty for all crime is death.
We all applaud Picard for saving Crushers life but we shouldn't act like he didn't trample on the Edo's sovereignty and the Prime Directive in the process.
"Trample on their sovereignty" is a very emotionally loaded term without a lot of definition. Is any violation of Edo law a violation of their sovereignty? Is interfering with their ability to impose their law enforcement system on a Federation citizen who was not made aware of their legal penalties a violation of their sovereignty? Or is it a mere violation of Edo law?
I'm inclined to say that violating Edo sovereignty means in some way infringing upon the Edo's ability to govern themselves.
By that definition, Picard did
not trample on the Edo's sovereignty. He violated their laws, yes -- but not once did he interfere with their ability to govern themselves. He interfered with their ability to impose their laws on a Federation citizen, yes -- and then he made up for it by ensuring that no other Federation citizens would ever violate Edo laws in the future or in any way impose their will on the Edo again.
Now, if we expand the definition of "trample on sovereignty" to include this, then he might have: "To trample on another nation's sovereignty is to interfere with their ability to govern themselves or with their ability to conduct foreign relations with other sovereign states as equals."
Did Picard's removal of a Federation citizen from Edo custody constitute an interference in the Edo government's ability to conduct foreign relations with other sovereign states as equals? Maybe. In that definition, Picard may well have committed a violation of Edo sovereignty. Even there, however, I would consider it a very minor violation; he certainly did not inhibit the ability of the Edo government or law enforcement apparatus to function in any other circumstances, nor did he require a change in Edo policy. Hell, he didn't even pull a "James T. Kirk" and destroy their alien worship-figure. He just removed his people from the scene and left the Edo to run their planet as they saw fit.
But extracting Wesley Crusher could have unforeseen complications. It could lead to some Edo defying the laws and the death penalty. Leading their world down a troubling path.
But that's
their choice to make; that's not interference in their internal affairs, because it doesn't involve the Federation taking sides in their internal conflict. Sure, one side in that conflict may be inspired by the fact that the UFP extracted Wesley, but non-interference is not non-influence. Cultures do not exist in a vacuum, and cultural syncretism, while it can have negative consequences, is not itself a negative thing. The Federation came and then it left, and the Edo continued to rule themselves; it is not responsible for the fact that an Edo faction decided their ideas were better than their government's, and it should not feel guilty for this.
The Edo are a mature society full of adults. They can make decisions for themselves. They're not children.
They certainly act like children
That's a prime example of the kind of cultural chauvinism and prejudice that underlies much of early TNG. Like it or not, the Edo are
not children who need to be protected from new ideas, lest they "contaminate" some sort of "cultural purity." They are adults, capable of assimilating new ideas and deciding what they want to do with them. It is not the Federation's place to decide that any disagreements among the Edo are a bad thing.