Of course you can cap wages otherwise public sector pay grades would be illegal for example all UK police officers are paid according to a grade band that's not illegal is it ?
Don't be stupid man, an employer can have wage bands of course and the government is an employer. Can the government cap wages
of all employees in the country? Of course not. You are being blinded to find a solution