“Worst case if you split up - you sell the house...”
Right. So depending on when you split up, which sounds like something more likely to be sooner than later, you’ll be exposing yourself to a lot of financial risk.
You’ll have spent fees on solicitors and searches to buy and you’ll spend more of the same, plus agency fees, to get shot of it. Your house is unlikely to gain much equity in the short term and, depending on where Brexit ends up, we may see values stagnate or drop. Housing in this country is a bubble waiting to burst.
Add to all that the additional emotional stresses of sorting the property out during a divorce and the difficulty in accessing money for a deposit on a rental until it’s sold... I think you’d be insanse to buy a place together.
The only “unless” is if you are getting a substantial ex-council / ex-social house discount, in which case I’d suggest you discuss it first and agree rules, in advance, on living as flat mates if you separate whilst living there. If I remember it correctly, there’s a minimum period on right to buy of how long you have to wait before selling on so check that out as well.