Here is your explanation:
The EU is a single market, that was formed by political will. As such, it is a top down bureaucratic structure.
When it was first formed, it achieved its ends and initially resulted in economic growth.
However, the political construct, over regulation, tariffs and especially the Euro, has severely distorted the market. Many European countries are effectively bankrupt and the Meditteranean countries are in technical default.
Germany has a net trade surplus and cannot get rid of it because they cannot manage their own currency.
Europeans are getting poorer - even the Germans.
The fact that countries are tied into a political construct that overrides the sovereignty of their nations, means that these distortions are not being dealt with, and the bureaucrats are resistant to reform.
The Single Market is the largest economy in the world. But because of the over regulation, cost of labour and protectionism, it is the slowest growing of all the economies.
Immigration is irrelevant. Europeans are simply not having enough children, the population is ageing and reducing so immigration is required. However, open borders again, is a bureaucratic political decision and not driven wholly by the markets. When you have large inflow of unskilled people from third world countries whose PCI (per capita income) is a fraction of the PCI of a European, then by simple arithmetic the PCI is lowered. This explains the tension and alienation of the working classes.
The rise in populism across Europe is a result of these economic tensions. Brexit is a RATIONAL response, not the small minded bigoted racist [fill in ad hominem slur].
The EU IS going to break up if it refuses to reform. It is just a matter of time.
Hope that helps.