It didn't merge into the EU at all. The European Union was a political integration strategy aimed at developing a federal Europe. The Maastricht and Lisbon treaties created a union which no one voted for in the UK
Our economic prosperity in the 90's was largely due to one thing. Our decision to retain our own currency. If we hadn't we most certainly would not now be the 5th largest economy. It's devaluation in the 90's would have had a catastrophic impact on the uk. Without being rude if you deny this then you are not worthy of debate as practically every economist will tell you that.
Only once did we try and ally to Europe and that was the Exchange Rate Mechanism. Despite her bluster until that point Thatcher was a typical euriphile. The dopes Lampnt and Clarke would have kept us in it and had the euro. At they point mortgage interest rates would have escalated to virtually 20%. It showed the price you really could pay allied to a huge unworkable conglomerate like the EU.
Who ratified the treaties you refer to? Our elected representatives. We gave them the right to do that. That is our parliamentary system. So, in effect we did indirectly vote for the treaties...as with all other legislation ever passed in our democratic system.
If you remember Healey coming back from holiday to arrange a bailout, the Winter of discontent, inflation linked pay rises, then you can see what can happen outside of the present EU - then old common market and before. You prefer to blame all disasters, or your presumption of possible disastrous conditions, on being in the EU or Euro.
Having control by our politicians doesn't necessarily mean we are better off. Leaving the EU is not a magic formula for a successful UK. Far from it.
What is the volume in UK - Europe trade now in comparison to before these treaties were passed? How many people are now employed in the U.K. compared to before these treaties were passed?
Won't argue with your speculation on ERM. You could be right... ( my speculation).