Like others have mentioned, I think putting all possible contingencies in writing in advance is the key to making this work. Things like:
~what happens when one household can no longer afford their portion,
~what happens with a third bedroom renter is unavailable/trashes the place/ starts a meth lab/ wants to move a partner in,
~what happens when someone's life changes unexpectedly and they need to pull out of the arrangement, financially and otherwise,
~what happens if the friend and his partner decide to have kids (even if you don't want your own),
~limits on house guests, boundaries, etc.
~how you evaluate, agree on, and split costs of things like new roof, plumbing repairs, HVAC, etc. Do you both set aside a portion each month for deferred maintenance/ capital expenditures, etc.
~what happens when/if you and the co-owner become legally married to partners,
~life insurance expectations
~right of inheritance expectations
~what happens if/when values unexpectedly decrease, due to natural disaster or other acts of god
~how you would evaluate the equity/property value in a mutually-agreed upon manner
Etc.
Etc.
People are not wrong to point out holes, but its not impossible. You just have to go in assuming every potential scenario and have a pre-agreed plan of action to reduce (not eliminate) problems. A lawyer is absolutely a must, if you proceed.
I too, as both a homeowner and landlord with multiple properties, would never opt to own property that I lived in personally with someone other than a legal spouse. I would invest in partnerships only with clear, financial goals and an airtight partnership agreement - and even then, I've preferred the path of owning 100% of all property, rather than more total properties at a smaller percentage. Your mileage may very.
10 - 30 years is a long time for people's goals, priorities, personalities and whatnot to change. I too have a version of decades-long 'intentional family', but I would fear living together breeds opportunity to disrupt the dynamics. I would argue your best bet to keep relationships happy and healthy is to not mix financials (read: home ownership).