Eunuch crossdressing priests were present in Sumeria, Babylon, Phrygia, and then the pre-christian Roman Empire too when Phrygian religion was incorporated into the pantheon. If you want to find historical records of people like this, they tend to appear during times and places with an abundance of resources. Resource abundance creates surplus people, which decreases the constant need for procreation in order to maintain civilization, which thereby weakens the incentive to enforce strict gender roles. That is at least part of the puzzle.
Eunuchs are not transgender. Most of them were castrated by force either so that they could guard a harem or so that they wouldn't lose their singing voice. Getting your cock cut off for religious reasons so that you could be a priest does not mean that you thought you were a woman, it just means that priests in ancient times removed the temptation when they took a vow of celibacy.
Just because you got your pecker snipped off against your will doesn't make you a trans icon.