Isn't that easy to accomplish, though? Can I create one of those business structures and then be the owner and draw a taxable salary? If not, can my spouse or child draw a taxable salary?
I'm not a CPA but I believe real estate makes the situation more complicated.
By IRS decree, real estate income is passive income for the owner of the asset, unless that person is a qualified real estate professional. There are several requirements to qualify and the IRS has recently audited extensively for people they believe are not qualified in their book- one cannot work a full time W2 job in addition to real estate, for example. Thus why I asked if OP or his spouse were both full time W2 employees.
401k contributions must be made from active income. Ergo, someone needs to be a IRS qualified real estate professional to contribute to a solo 401k from their real estate income.
I'm never heard of an S Corp being a sufficient barrier to allow a person to be paid for their work and qualify for active income. I'm not saying it's not possible; however, it is worth considering whether the cost to set up and file taxes for the LLCs to own the rentals and umbrella S corp property management company along with the loss of real estate deductions and ability for obtain cheap personal mortgages would be worth it financially.
The actual statute (which comes from Congress and not the IRS) is Internal Revenue Code Sec 469... and what it says is that real estate is by definition a passive activity and losses from passive activities in excess of passive income get delayed in terms of their deductibility until the point you dispose of the activity unless an exception applies... there are several exceptions and wrinkles but the exception we're talking about here is the "real estate professional" exception.
That exception says that if you're a real estate professional, your passive losses don't get delayed... and that you're a real estate professional if you spent at least 750 hours a year and more than 50% of your time in a specified role: real estate broker or agent, real estate developer, real estate property manager.
To repeat something I said, earlier, I'm not sure how well this S corporation property management company works. I know people do it. Er, my experience with it has only been in shutting down the structure...
I also agree with the costs issue... and actually the biggest cost would be paying all the payroll taxes at the S corporation level to get the pension deduction. That would rarely be worth it in my experience.