I’m not really aware of that. Not to say troll couldn’t be used in a sexist way (“men are brutish trolls”). Even from the earliest myths of trolls I believe they could be either sex. There’s also nothing I’m aware of to suggest in d&d that trolls would all be represented as male.
https://en.m.wikipedia.org/wiki/Bergsrå
Trolls also are not a myth that comes from a matriarchal society directly used to opress men, unlike how the idea of hags and witches was used in a patriarchal society to opress women.
Just some examples, male doctors trying to eliminate female competition:
Women were far more likely to be accused of witchcraft. It was often used to persecute those who chose not to settle down with men or become housewives, or those who were running their own businesses:
https://www.cam.ac.uk/stories/witchcraft-work-women
There’s lots of sources and writings out there on the history of witchcraft and its relationship to misogyny. Especially in the middle ages, renaissance, and colonial America.
And at least in d&d hags are described as being exclusively female. Some creatures that might be problematic in some contexts like the succubus have added a male equivalent like the incubus. Hag is also still used as a sexist insult for older women.
D&d also explicitly describes female trolls too. Female trolls are also described as larger and stronger than males. Here’s a happy troll family from a d&d source book, lol.
Again not saying you can’t enjoy something or use it in an rpg just because the person who wrote it may have problematic opinions or it might have some mixed history. Like I really enjoy Lovecraft, but holy crap is it a mess in terms of racist undertones because of the author.