I like the way you're thinking, but allow me to suggest an alternative.
For most of recorded history the living conditions of the world have been universally shit for those not at the top of society. Getting to be part of the top of society is never easy, but the benefits tend to be enormous.
In the old days of Tang Strategic Victories, I'm not sure how many people who were eunuchs actually chose to lop of the eggplant, they weren't big on consent or free will back then, but the likely less than consensual deal is still eerily similar to the situation we see now with exploding numbers of dumpy depressed men bidding farewell to longterm health: lose dick, get resources/benefits well in excess of that typically available to the common man.
I think it's hard to argue the siren call of the benefits typically bestowed on eunuchs as a result of horny monarchs and their ilk needing clear familial bloodlines wouldn't be noticed by anyone aware of how things worked when you consider the shithole most people lived in day to day. Most probably didn't think of it in terms of "lose dick, get benefits" and then pursued losing their dick to get those benefits, but rather something like "I want to work for the king's court so I will try to find a way to do so, and I am aware this will result in me losing my dick but that is probably worth it".
By contrast to those times, the "need" for eunuchs by the tippy top of society waned greatly in the last 150 years: the demand shrunk due to changing views of human dignity and all that shit, in some cases legal reasons, and most importantly there was no longer a niche to fill basically anywhere: the rich found other ways to protect theirs so to speak.
The big difference between those last 150 years and the last decade or so is many someones created a situation where it was once again profitable to trade schlong for shekels, but this time around the resulting eunuchs have no other purpose to fill.