Why would they fire or investigate you? It’s not like you’re organizing strikes or anything like that. You are simply benefiting of the same knowledge that companies have to have a fairer deal.
You’re going to negotiate with the knowledge in par with the company that is interested in having you.
Knowledge is power. - France is bacon.
Unless companies conspire not to hire you in order to depress wages.
https://variety.com/2017/biz/news/disney-settlement-wage-fix...
It's why some companies will try to find ways to fire you if you share your salary.
Without the threat of collective action, the idea is toothless.
In the current situation, companies have access to this and employees don’t.