I think Picard summed up the general Federation attitude to genetic manipulation of humans in the episode "The Masterpiece Society":
"They have given their humanity away to this genetic manipulation... many of the qualities they breed out -- the uncertainty, the self-discovery, the unknown - those are the very qualities that make Human life worth living... at least to me. I would not like to live with the knowledge that much of my future has been written, that my boundaries have been set. Would you?"
At the same time, however, Picard says in "Justice" that Federation science can "detect the seeds of criminality" (or words to that effect). The implication - at least to me - is that brain structures that can identify sociopathy and psychopathy can be detected and corrected via some sort of genetic modification. I guess it becomes a question of where the line is drawn...and the line between correcting a flaw and enhancing an ability is a very fuzzy one indeed.
When you are dead, you don't know that you are dead. It is difficult only for others.
It's the same when you are stupid...