The value you bring to the organisation is often beyond your control. You may be allocated to a profitable project or "on the bench" if the work has temporarily dried up.
Not many employees would be happy taking a salary cut if their skillset becames less valuable (for whatever reason
).
There are so many variations and possible complications I don't think there is a fair "solution" to the salary disclosure question.
Different approaches work at different times for different organisations.