If you want to pay as few taxes as possible, some advice.
-The first 7 UIT ( S/. 25900) which is around S/. 1850 is taxfree. So you could pay that salary to the socios in planilla. Your tax will be almost zero ( you pay 9% to EsSalud, if you get into an EPS, you pay only 6.75 %, and your health insurance is partly paid by your company, they rest of your health insurance also can be paid by your company taxfree. ). Also you pay around 13% to your pension plan ( AFP ) which in the end is your own money.
then up to S/. 125800 the tax is 15%, which is still lower than 30%+4.1%, and up to S/. 225700 is 21%, which still is lower than 30%+4.1%.
-Then if you own the property where your company is located, you can rent out that property to your company at only 5% ( instead of 30% profit tax + 4.1% divident tax )
the rent you can charge cannot be higher than a reasonable market conform rent. ( if it is lower than 6% of the autovalúo, which is very unlikely, then you must pay 5% of that autovalúo ) If you are a nonresident, the tax is not 5% but 6.25%, still a lot lower than the 30% + 4.1%
If you don't use any of those tricks, you pay 30% profit tax, and 4.1% divident tax.
I don't know of more tax 'tricks', I would be glad to hear some of them, to see if we can implement them in our company.
Concluding, pay as much rent as possible to yourself, and then increase your salary to the max, to pay as few taxes as possible.
There are some limitations to the height of your salary compared to lower paid employees in your company. Check out the details about that.
The government put some limitations on some more advanced tax tricks, like putting a property in a company, and sell the company with a profit without paying taxes. That is now an official not recognized tax trick. ( Normally if you sell a property with a profit, you pay 30% taxes on the profit, but if you sell a company ( who is owner of a property) with a profit, you don't pay taxes. But if the presume that you only sold the company to avoid that profit tax on the property you anyway have to pay the tax, + the multa and interest, and maybe a criminal fraud charge.