The way to handle this, which no one seems to be willing to face, is to make laws that are not wealth-neutral. If you are a mom-and-pop landlord (with a relatively low net worth), your should have more leeway in dealing with tenants. If you are a large landlord, you should have very little. Couple this with ruinous penalties (e.g., full forfeiture) for attempting to hide the true beneficial ownership of the property.
In many locations, this exists in practice - especially if you rent parts of a building that you reside in (one half of a duplex or 1/4th of a quadplex, etc).
In some cases, anti-discrimination laws don't even apply.