Is it ethical to investigate questions whose answers may inspire harm? It seems like the best way to examine that might be to look at the extreme, ideas that cause suffering and death. Some insight might be found in the philosophy of Tom Regan who approached such questions from the general direction of the behemoth in philosophy, Immanual Kant. In the introduction to the essays Matters of Life and Death: New Introductory Essays in Moral Philosophy, Regan on page 4 raises the usual questions regarding the ethics of dying and death. "If we are doing nothing to prevent [suffering and death], are we then just as guilty as someone who would let a small baby drown when he or she could prevent it?" It may seem extreme to suggest that ideas kill people, but the Armenian genocide could not have happened with ideas since the collective actions to exterminate require "institutional facts", as John Searle would call them.
How to answer such a question philosophically, according to Regan, requires meta-ethics. From WP:
Meta-ethics is the branch of ethics that seeks to understand the nature of ethical properties, statements, attitudes, and judgments. Meta-ethics is one of the three branches of ethics generally studied by philosophers, the others being normative ethics and applied ethics.
And therefore while there be no universally accepted answer regarding an ethics of harmful ideas, certainly the question raises a number of other questions regarding exactly what is universal to all human ethics that can tease apart some possible choices.
Peter Singer, in his Writings on an Ethical Life declares on page 9 "I shall deny... that ethics is relative or subjective", and challenges the idea that ethics is not rooted in a human universal characteristic. He throughout the following passage originally an excerpt from his Practical Ethics goes on to show how relativism in weak and narrow forms does not fare well in the face of reason. Singer, of course, is supported by the science of Frans de Waal who in his Primates and Philosophy reflects on morality given his understanding of chimps and bonobos, the closest relatives to human. He says on page 161:
"I would never speak of 'discontinutities.' Evolution does not occur in leaps: new traits are modifications of old ones so that closely related species differ only gradually. Even if human morality represents a significant forward, it hardly breaks with the past.
So, can the question about the ethics of ideas be answered objectively? It seems that it can and that if it is, that one might take the position that it is unethical not to investigate all ideas since it is not clear which may be harmful to people.
The danger of ideas is not ideas in themselves, but the presentation of those ideas in a framework intended to harm others. Hence, no idea is free from being harmful, including even logical contradictions; George Orwell in 1984 wrote of a world where war could be defined as peace. Noam Chomsky in his Manufacturing Consent on page 107 states that "A propaganda system will consistently portray people abused in enemy states as worthy victims..." and it seems any idea may be the means by which we portray people poorly. It is not exploring the link between race and IQ that is the danger, but the misrepresentation of the findings by bad actors that is the real threat. This isn't a problem of the idea per se, but of those who would set aside their morality and obligation to critical thought in order to be a part of a social movement organized by bad actors. Both Dan Ariely in his Predictably Irrational and Daniel Kahneman in his Thinking, Fast and Slow show that even the individual is prone to make choices based on powerful emotional forces that go beyond logic and exemplary forms of reason.
The True Believer by Eric Hoffer, recognizes that the power isn't so much in words and ideas, but those who wield them. Any idea which can contribute to hatred, imitation, persuasion and coercion, support leadership, lead to action, and drum up suspicion serves to unify true believers and movements that lead to harming others. It's hard to imagine that Eric Hoffer conceived of the true believer as someone who would always see the moral message in the literal one. Even followers of Jesus who preached love and forgiveness, after all, became infamous for great cruelty during the Spanish Inquisition.
Intellecuals love to inflate words to a form of power, as Gilbert Ryle noted in his Concept of the Mind. But perhaps it is a conceit to think that "new" ideas are any more dangerous than old ones given the deep roots of apathy, fear, and violence inherent in our inherited psychologies. Alice Miller in both her Drama of the Gifted Child and For Your Own Good laid bare the mechanisms that tend to cause suffering in the world when considering how people treat each other, and those forces at play that appear to make ideas dangerous are just an extension of the same old psychological forces that underlie ethical decisions. Frans de Waal shows with clarity in his Chimpanzee Politics: Power and Sex among Apes that the evils in society are just as much a part of chimp culture as they are of the human kind. Perhaps the insistence that some ideas are inherently dangerous is a continuation of the anthropodenial he claims is widespread: mankind pretending to be further from genetic kin than is true, hiding behind a facade that ideas separate our actions substantially, and are somehow to blame for great harms instead of men and women who commit bad acts. If this is the case, that people aren't that greatly removed from chimpanzees despite their words, then it might be unethical not to explore all ideas to show that ideas are indeed not at the bottom of the wellspring of harm after all. All too often are great evils are committed among the echoes of even benevolent ideas, after all.