If accounts and HR do not have the figures of what employees are paid already in a spreadsheet somewhere, in a form that is easy to run statistics on, then you have larger problems than producing reports for government.
And given you have not answered, why do you think that publicising employee compensation would reduce employee compensation?
You seem to be using the logic that the government tried something once and it did the opposite, so therefore all government policies do the opposite, rather than engaging with the potential outcomes of this specific idea.
As explained elsewhere, a figure of gross pay is definitely somewhere, but whether that is the figure required by law to be reported, and a figure that someone will think is what should honestly be reported, that's already another matter.
I did not argue that publicising employee compensation would reduce employee compensation, that was someone else. Perhaps you confuse authors.