The solution is not to prevent workers from getting better wages but to punish companies for profiteering. It can be argued that the current spike in inflation is because companies are raising prices despite record profits
I'm not saying that companies should pass these wage increases on to consumers, just that they usually do.