Leaving the EU customs union was an own-goal when the EU is Britain's largest trading partner. There's too much money to be made in simplifying the customs rules, so that rollback is perhaps inevitable.
The viability of the EU as a political union, though, remains to be seen. It is not clear that European politics will ever transcend nationalism. The last two world wars started in Europe for nationalist reasons. The third one probably will too. The challenges that face all of us cannot be solved by nation-states.
We are already seeing EU nations grumble about supplying weapons to Ukraine to counter Russian aggression. The Ukrainians have shown themselves to be capable warfighters. The Russians have shown themselves to be consummate bullies. European politicians remain focused on narrow national interests in the face of Putin's imperialist plans. "It is not in our national interest to support Ukraine," says Orban. He will say that until Russian tanks are again on the streets of Budapest. Perhaps even after.
The only time Europe was politically a unit was during the Roman empire, and that included large parts of North Africa. I don't see the EU expanding that far. Heck I don't see them admitting Turkey. All because European politics is still based on nationalist interests.
It is here that Britain was perhaps wise to leave the EU. The EU is an insular club of developed nations that are socially liberal but ultimately inward-looking conservatives seeking to preserve a privileged status-quo. If the EU cannot innovate, it seeks to regulate - e.g. GDPR, and AI. Such a project fails to engage with the dynamic world and is doomed to failure.