Ok, this topic will depend slightly based on where you live, but a common pattern to optimize your revenue to pay as little taxes as possible is as follows:
Instead of opening your company entity under yourself directly, you want to open a holding company. Let's call the holding company "company H".
Holding company H has no operations. The only purpose of this company is to own others companies and other assets:
Company H will open and own the other company where your business operations happen, let's call this company O (for operations).
Company O makes money and pays taxes on what's left after expenses, this is normal, and is how it would work anyway and there are already benefits by just doing it like this (compared to self employed). The holding company helps when you want to use the money for something else.
Aside: When you're self employed, you get less freedom on what you can write off, and end up paying taxes on more money than needed. You probably don't need a $9000/month salary. Pay yourself what you need for bills, and leave the rest in the company in order to avoid paying taxes on it for no reason.
tl;dr; salary is taxed to hell. Don't make a high salary, EVER!
Now let's say company O has a solid $1,000,000 in its bank account. If you wanted to take this money out yourself to invest, or buy property personally, it would be taxed to hell. (50%, 60%, maybe more). If that's the case you'd be left with $500,000 - $400,000
So, this is where the holding company comes in handy. Here in Norway, Company O can transfer money to company H with an effective tax rate of 0.66%(yes! that low!) meaning out of the $1,000,000 in company O, you can successfully transfer $993,400 into the account of company H. We just brought down your tax bill from $500,000-$600,000 to $6600, how do you like them apples?
the 0.66% tax rate changes depending on whether you have a right or left leaning government, generally right leaning = lower; left leaning = higher.
You now have $993,400 to invest or buy assets via your holding company, a house (depends on your laws, limits may apply, here, each holding company can have a maximum of 3 properties, lots of small print), or invest into other companies (your own or others, doesn't matter).
You can also start more companies under your holding company and put money from company O, into company H, and then into a new company B, if you want, without ever touching your own personal money, and without paying much taxes on it.
Will depend on each country, but here in Norway, losses incurred through a holding company cannot be deducted from your personal taxes. Eg: you personally make $100,000 in a year, but also lose $100,000 in your holding company because LUNA crashed, you will pay taxes for $100,000 normally, no deductions because of the loss. If, however, you had invested $100,000 and lost personally, your tax rate for that year would be different because of your losses, since your PERSONAL losses - gains = $0.
I pay someone to handle this for me and every country has different rules. But it's a very common structure pretty much everywhere, completely legal, and also comes with the added protection of having two entities between YOU and your customers. In case of litigation, your personal assets are protected not once, but twice!
You can have the holding company be owned and controlled by a trust fund instead of by you directly, and you can tell the trust fund manager to do whatever you want even after you're dead.
Is anyone taking advantage of this here? For solo bootstrapped businesses the benefits are less obvious especially starting off. But once you're at 5 figures per month you might change your mind.
My main business is owned 30% by Abreu Holding (creative name, I know). My side businesses start off via my "self employment" entity, but when something catches on, It'll be an entity of its own, owned by my holding company as well :)