What you're claiming is wrong and misleading. It's rare and almost always justified.
For the times it isn't, which I haven't seen for a few years, I've emailed those people where they've shown an email.
They usually say thanks, that other people have also emailed them and they'll contact the mod team.
i.e. there are plenty of long-term members of this site that keep an eye on shadow bans and we generally thintk it's working as intended.
I checked one out a couple of days ago, and literally 4 comments earlier dang had warned them that if they kept it up with the short, low-quality comments they'd probably end up shadow-banned.
You also use the word troll but I've seen people get shadowbanned that weren't trolls, but people in the thread simply didn't like their comments because they were advocating for open source solutions or for sharing negative criticism about a company based on their real-life experiences.
I'm sure there are legitimate cases to ban users, but shadow-banning is just poor ethics. Just ban people if you don't want users that may go against the typical pro-corporate yes man type agenda rather than mislead and say that they are trolls, when apparently (based on my experience) your definition of troll is someone who doesn't go along with the topics general opinion even if they have legitimate reasons not to.
We do tell people that we're banning them, and why: https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que... - but only once the account has an established history. We treat new accounts differently, for reasons I've explained before. I'll try to dig that up... Edit: here you go:
https://news.ycombinator.com/item?id=21288858
https://news.ycombinator.com/item?id=20666742
https://news.ycombinator.com/item?id=20289994
It's a bimodal distribution in that we treat these disjoint groups very differently. With established accounts, we warn them before banning, usually several times, and then tell them we're banning them and why. With new accounts, we don't say we're banning because the population of banned-new-accounts is overwhelmingly spammers and trolls, often serial trolls who have been banned many times and know perfectly well what they're doing.
Link to the entire comment: https://news.ycombinator.com/item?id=23686672