I think so, but especially since the advent of the internet.
I think a mixture of being (1) a small minority (~1%), (2) which is ostracized, and (3) exists roughly homogenously in the population meant the internet provided an opportunity for community that didn't exist before.
The big thing is the super low-risk and anonymous environment. If you're gay but feel shame about it, or that you might suffer violence for coming out, then your computer might be the first place you don't feel alone.
For ~1980 through ~2010, community meant having a sysadmin to host a bbs / usenet / email list / irc / phpbb, and community meant having the technical knowledge required to join one of those. So, lgbt people and trans people especially have a good reason to become computer people.
I think this pattern applies to other groups which meet the same criteria. E.g. people at far ends of the political spectrum, the extremes you might have found under alt.sex, fans of specific media like TV shows, or people talking about weird alternative operating systems.
I'm not trans, but I have to imagine that sort of acceptance is the goal. I wonder the degree to which our media portrayal of hacker subculture has influenced the desire among certain demographics / subcultures to gravitate towards those jobs.
And when you combine that with recent studies that show a correlation between autism and gender variance[1], that might provide some insight.
[1] See e.g. <https://behavioral-innovations.com/blog/exploring-the-inters...>. "Research shows that people who do not identify with the sex they were assigned at birth are anywhere from three to six times as likely to have autism spectrum disorder as compared to cisgender people – those who do identify with the sex they were assigned at birth."
Maybe working with computers provides a better environment for people with social-related issues ?