As I said, the biggest issue was Cameron, he decided to use a referendum as a means to win votes, as he could not do anything about Lisbon since the previous Labour shower of shite ratified it on the sly, back in 2013. The referendum was then enshrined in law, but he was so confident that the people of the UK would follow his lead he point blank refused to allow any planning for what to do if the electorate said "Out", which was actually guaranteed thanks to the sight of tens of thousands of economic migrants and benefits shoppers marching across Europe to reach what they believed to be the Promised Land. Add in Cameron going to Brussels and asking for fuck all and STILL managing to come back with less and the result was going to be obvious, especially when the scare stories were the only weapon the Remain side had, their campaign was a mess.
Then Cameron backs out of a clear promise he made and ran away like a coward instead of doing what he swore he would do, leaving, eventually, May to hold that poisoned chalice.
That's where it went wrong, 2013. Then from 2015 when Cameron STILL didn't plan for all eventualities. His ego grew too large, he believed his own hype, that always ends in only one way.
May? She was only ever going to be a stopgap, she's out in the summer of next year when whatever failure they call the Brexit deal is finalised. Never mind a lame duck, that quack's been a paraplegic since the day she was anointed leader. And she knows it.