I think it's important to recognise that about 3 million UK long-term settled residents were not allowed to vote, and they were the people most strongly affected by it. And some UK citizens abroad were also not allowed to vote. Perversely given the nature of the issue, non-EU citizens with exactly the same type of migration were allowed to vote.
There were about 3.4 million non-UK EU citizens, many of them settled adults of voting age. They would have voted if they had migrated to the UK and become citizens. But they were told all their lives, that EU citizens don't need to become UK citizens, they have equivalent full rights in almost every respect without doing so, so they lived here in a fully settled way akin to citizenship. Sometimes for decades, with children and grandchildren in the UK. Some of them had respected positions in government.
Any of them, of voting age, could have registered to vote in the referendum if they had known sufficiently far in advance. That is, they could have applied for UK citizenship to do it - though not in the timescale in which the referendum actually occurred.
But EU citizens were discouraged from adopting UK citizenship because there was no need. This led to the perverse situation where non-EU immigrants had the vote, and EU immigrants did not, through no fault of their own.
The UK citizens, of voting age, who were not allowed to vote were all abroad. I expect most of them in the EU.
I'm pretty sure both groups would be pro-EU, and that 3 million number is more than enough to change the result.
So I would not say the Brexit referendum result of 2016 was even the popular result, for any reasonable definition of democracy in my mind.