I posted about this before.
Yes you need an LLC and to pay yourself a market ready salary and then take the rest of your money as distributions. But yes the primary interest is you need to run your own business to create as many tax deferred vehicles such as retirement accounts and hsa accounts as possible.
but the thing that really stands out to me is that your friend is paying 300,000 a year in taxes as a doctor.
Even as a W-2 that means he's probably making around $8-900,000 a year. That is substantially above the median physician income even for surgeons.