This approach exploded fairly spectacularly in the UK for many of those deemed by the tax office (HMRC) to be using it purely as a device to attempt to avoid being "on payroll"
https://www.gov.uk/guidance/understanding-off-payroll-workin...
Even BBC presenters were setting up "personal service companies" to try and avoid taxes (allegedly at the urging of the BBC) and ended up owing the tax office a bunch of back taxes.
This might not be an issue if the corporate income tax + financial gains tax comes out the same as payroll tax. The bigger issue here is that you can use the remaining funds to invest and losses form a tax deduction base. More commonly however people just cram as much personal consumption inside the companies before paying out the salary, even things like travel and dining out. In the EU, VAT is commonly quite high and you get refunds on that if the expenses are on the company.