They dont need to know what every players earning but they can access the rules of the salary cap as easily as anyone (theyre here https://d2cx26qpfwuhvu.cloudfront.net/premier/wp-content/uploads/2016/05/03161651/Salary-Cap-Regulations-2018-19.pdf) so if part of their contract involves ways to circumvent these rules, the player will know.
It has been alleged in the past that players were paid in foreign countries, etc. We can see that this would be an attempt to get round the cap so why wouldnt a player (plus their agent, lawyer, etc)?
Because a player can be paid in any way that the club deems fit, so long as the club report it. The player cannot be held responsible if the club doesn't report it.