The Klingon Augment Virus is the real reason for the ban on genetic engineering (includes spoilers from SNW 2.2)
It's never made much sense that the entire multi-species Federation would be subject to a strict ban on genetic engineering due to events on Earth that happened centuries before the Federation was even founded. The way they doubled down on that rationale in Una's trial only highlighted the absurdity -- especially when Admiral April claimed he would exclude Una to prevent genocide.
On the one hand, the writers may be trying to create a straw man out of a weird part of Star Trek lore so they can have a civil rights issue in Starfleet. And that's fine. From an in-universe perspective, though, I think we can discern another reason for the ban on genetic engineering -- the Klingon Augment Virus.
There was a ban on genetic engineering on United Earth, which is understandable given that it was much closer to the time of the Eugenics Wars. Why would that remain unchanged when more time passed, more species joined, and more humans lived in places without living reminders of the war? [NOTE: I have updated the paragraph up to this point to reflect @Value Subtracted's correction in comments.] The answer is presumably that they needed to reassure the Klingons that something like the Augment Virus would never happen again. Hence they instituted a blanket ban around that time -- perhaps in 2155, the year after the Klingon Augment Virus crisis and also, according to Michael Burnham, the year the Geneva Protocols on Biological Weapons were updated.
That bought the Federation over a century of peace, but after war broke out due to a paranoid faction of Klingons who thought humans would dilute Klingon purity and after peace was only secured through the most improbable means, they doubled down on the ban. Una's revelation provided a perfect opportunity to signal to the Klingons that they were serious about the ban -- hence why they would add the charges of sedition, perhaps. Ultimately, an infinitely long speech and the prospect of losing one of their best captains combined to make them find a loophole -- but not to invalidate the ban or call it into question. This Klingon context is why April, who we know is caught up in war planning of various kinds, is so passionate that the ban exists "to prevent genocide" -- he's not thinking of people like Una, he's thinking of the near-genocide they suffered at the hands of the Klingons.
This theory still doesn't paint the Federation in a positive light, since they have effectively invented a false propaganda story to defend a policy that has led to demonstrable harm. But it makes a little more sense, at least to me. What do you think?
It's important to remember that Earth has an outsize influence on the Federation. The capital is, and always has been, there, and will continue to be until such time as it secedes entirely from the Federation after the Burn. The Academy is there. Starfleet is headquartered there, and grew out of United Earth's space service. Most of Starfleet is human, most Federation colonies are human. Azetbur was mistaken to call itself a "Homo sapiens-only club" but the fact is that from the beginning, as the only planet with friendly relations with Vulcan, Andoria, and Tellar Prime, as the very reason the Federation exists... Earth found itself with a power dynamic that highly favored it.
As such, I don't think it's too surprising that a specifically Earthican problem could weigh heavily on the Federation, even as it grew larger and more cosmopolitan.
it does not seem like Earth or Starfleet has any particular issue with genetic engineering in Enterprise
From "Cold Station 12":
ARCHER: He had frequent pain, hallucinations, he talked to people who weren't there. Often couldn't recognise me or my mother. The last two years of his life-
PHLOX: And you were thinking if genetic engineering had been permitted-
ARCHER: Maybe Soong has a point.
PHLOX: I've had time to examine his work more closely. I'm forced to admit some of it is extremely inventive. He's really quite brilliant. It's a shame such a man has to remain incarcerated.
ARCHER: He broke the law. That's why he was in prison. And that's why I'm going to make sure he goes back. Denobula perfected genetic engineering a long time ago, but you never came close to destroying yourselves.
I believe that genetic modification to fix defects/heal diseases is still acceptable; it's augmentation beyond what is considered to be "natural" that is the problem.
Right - the fuzzy area lies in what was done to Bashir, and I assume is what Archer is talking about here: "overpowering" a genetic disorder by enhancing other abilities.
The danger is in what gets defined as a "defect". I think we'd all be comfortable fixing congenital heart failure before birth, and I (hopefully) assume we'd all be very uncomfortable with "fixing autism". There's a big blurry area between those two things, and I think Trek has largely correctly tended on the conservative side.
But I like how this theory ties the timeline together in a way that makes a bit more sense, because the "risk of another Khan" is not, at this point, the most interesting problem with gene editing in Star Trek to me
Although, it seems to be blanket ban on modification at this point in time. It might have been loosened to allow modification in the case of defects later on, considering that the Illyrians would have no reason to try to devise something to reverse their modifications if modification was allowed, but augmentation was not.
Considering Phlox found that one of their main faults with Earth's genetic engineering program was that they went too far, and tried to create a perfect being, instead of making minor tweaks or improvements, that might be the path that most planets took.
It's also unclear what would be considered "natural" anyway. Even putting aside the Illyrians, we know from "A Measure of a Man" that "mega-strength" is fairly common out in the universe, but just not for humans.
Say a human being was genetically modified to have mega-strength, and telepathic abilities. That's not a naturally occurring feature in most humans, granted, so could be considered unnatural. But a Human/Vulcan hybrid would also have those abilities, and it would be rather silly to consider them unnatural, simply because they were lucky enough to have both Vulcan and Human heritage.
They even mentioned in the charges that the ban was on permanent genetic mods. I'm assuming something for an illness or injury would just be temporary until the issue is resolved.
If the purpose of prosecuting Una was to signal the Federation’s seriousness about a genetic ban to appease the Klingons, then why offer a plea deal with a sweetheart sentence? Why keep the records sealed? Why even bother with not charging her with sedition initially?
No, this isn’t plausible to me. If it was a show trial for a diplomatic purpose, it’d be full on from the beginning, no deals and having a Klingon observer in the courtroom. There’s no need to be coy about it.
It’s obvious that Starfleet and the Federation is embarrassed at having had an Illyrian not just join, but climb the ranks to be the best first officer in the fleet. That’s reason to sweep it under the rug, not use it as a message for the Klingons.
If it was a show trial for a diplomatic purpose, it’d be full on from the beginning, no deals and having a Klingon observer in the courtroom. There’s no need to be coy about it.
According to Worf the Augment virus and its effects are “not something the Klingons discuss with outsiders”. This show trial was about appeasing the High Council and assuring them there wouldn’t be more augmented officers after Una; not about appeasing the Klingon people. Observers etc would have been too high profile.
Okay, first they try to cover it up, because it's easier if the Klingons never find out. But then once she's uncooperative, you go all out to show it's serious. And you don't have a Klingon observer because you don't want the general public to know the Klingons are dictating such an important domestic policy.
One of the founding members of the Federation (and basically the creator of it's exploratory/defense fleet) is extremely traumatized over a war that killed hundreds of millions.
Then, another conflict involving augmented antagonists comes along and gives them all the reason to say "see?! We were right!!!"
It makes sense that following the Eugenics War (and I believe it's heavily suggested that the Eugenics War and disagreements around genetic modification were a key cause of WW3) that genetic engineering would be banned on Earth. First Contact happens not long after WW3 in 2063. It takes almost 90 years for Enterprise to be launched in 2151 with the help of the Vulcans.
WW1 ended 105 years ago and it's still taught in schools, including the causes. WW2 ended 78 years ago and is also still heavily taught and is used as a parallel for why fascism is bad, even today. Both are a similar time difference from today as WW3 at the time of Enterprise and has a higher death toll (30% of the population) and so if you could ban a leading cause of that war, you would. I could see UE making it a requirement on the other founding members (none of which seems to have particularly experimented with it, and have seen the effect on Earth. Banning it is only logical.)
During that time, we see a rise up of the Soong's augments in 2154, which ends badly and I think would be more than enough to reinforce the prejudice in Earth society (and the Vulcans and Andorians would have been aware of it too.) Plus we see the Klingon Augment Virus as you suggested.
SNW takes place in 2260, which is about 100 years on and now the Federation has obviously been founded and is a growing force - but 100 years isn't that long and as human life times are suggested to be extending by then - there are probably people alive that remember the events of 2154. The rules have also led to fewer or no repeatable events involving augments and I can understand wanting to keep it that way.
Then in DS9, we see that it is still being practised illegally by some. Occasionally it turns out fine like Bashir but often leads to medical issues like Jack and his group in statistical probabilities. (Which again, ends with them trying to force the Federation to surrender to the Dominion.)