The idea that susceptibility to dumb ideologies is a genetic weakness that “smarter” people are not susceptible to is completely at odds with current anthropological and sociological knowledge - ideology is part of the human condition, and being unable to determine whether or not your ideology is dangerous bullshit is part of the nature of ideology. Teichmuller, Nazi Germany’s greatest mathematician, was also an anti-Semitic loon.
I was not saying that the idea of not having children is genetically determined. (There might be some genetical component related to being susceptible to depressions, but that's not the point).
I was trying to say, that the idea itself is often passed to children, via non-genetic means, and it will burn out the part of population bearing it.
But that's not fatal for humanity because there are many smart people who have multiple children, so independently of exact percentage of heritability of intellect we are not doomed.
And regarding to the snide comment about Elon, independently of his opinions on any issues, he have done enough to prove that he is smarter and vastly more useful to humanity than average people.
Your comment about “smart people will have lots of kids who will save us” [paraphrasing] is ironically invalidated by Elon Musk himself, whose COVID tweeting and commentary is pure fact-free ideology (most infamously here: https://mobile.twitter.com/elonmusk/status/12407546572631449... but he’s still going: https://www.businessinsider.com/elon-musk-and-kids-wont-get-...) It is worth emphasizing that these comments are just straight-up indefensibly dumb.