The Berlaymont building in Brussels has the design quality of a large Meccano set, a hideous kit building that could be a monument to those countries specialising in taking the aesthetic back to year zero.

It is to officialdom what the Lada was to motoring.

Inside a bewildering labyrinth plays home to the officials of the European Commission where I spent Thursday in a series of briefings with senior officials on a range of topics.

A few words about those officials: I have never met such a super-bright group of professionals all of whom are utterly immersed in their area of expertise. They live and breathe the minutiae of Commission politics and seem genuinely motivated in the belief that their work is vital for the common good of the EU's citizens.

The day was fascinating in illuminating the scope and complexity of the Commission's work although it left me asking whether the ideal of pooling sovereignty to combat problems that do not respect borders could really be delivered in a club of 28 nations.

In the forthcoming EU referendum the Yes forces will argue that issues like climate change can only be tackled by countries cooperating together and having institutions that give some coherent governance to shared aspirations.

Never forget that the genesis of the EU has its roots in the story of human misery, of a post-war Europe scarred and divided with a refugee crisis defined by what happened when European nations went to war. Konrad Adenuer, Joseph Bech, Johan Willem Beyen and Winston Churchill can all claim for different reasons to be the founding fathers of the European ideal. Ironical therefore that Europe's greatest refugee crisis since 1945 might well be the issue that buries that ideal for good.

Some facts to underline the scale of the challenge and point to the possibility that the institutions will be overwhelmed: Last year there were 1.8 million "irregular entrants" to the EU. That might involve some people being counted twice or three times if they are recorded as passing through different member states. What is known for certain is that 1.2 million people applied for asylum. And what of the EU's official programme to settle permanently refugees successfully granted asylum? The target is a mere 160,000 over the next two years. To date only 400 people have been settled. Meanwhile new people arrive in Greece and Italy, a never-ending trail in misery and broken lives. Officials admit there could be another million people seeking sanctuary in 2016.

And when an official bluntly says "member states are not engaging" you wonder, well what's the point? Is this not the sort of crisis that the European ideal was supposed to solve. If countries won't engage with the problem don't these institutions lose all moral authority? Germany took a million refugees last year. Sweden 160,000. The UK, like Denmark and Ireland has an opt-out from the EU-wide refugee initiative although the Irish have opted in. The Schengen travel area could yet collapse. The attitude of countries like Poland and Hungary stands in sharp contrast to that of Germany.

And yet the European raison d'etre demands action that is coordinated and united. On this, Europe has failed this most basic test. The question is whether the eventual legacy of this failure will have wider implications for the European ideal. In 1952 the club was six-strong. When the UK joined in 1973 it had grown to nine. Now there are 28 nations all at different levels of development. Views of national identity vary wildly. Some electorates are more unforgiving if their governments do not advance national self-interests. It simply is not possible to pool sovereignty for shared values. This crisis has demonstrated that values are not shared.

If apocalyptic noises are being made about what the refugee crisis means for the future, it adds urgency to the need to reach an agreement with the UK on re-negotiated terms of membership. Officials are keen to stress that the Prime Minister's plan is not a deal "between the UK and Europe" but rather a deal between the UK and 27 other member states. They all have to play ball. And a way has to be found to manage David Cameron's ambition to curb benefits for migrants that does not involve treaty change. That is the only way to avoid the process being long, drawn-out and probably thwarted.

No one in Brussels seems over edgy about the prospects of not striking a deal. A June referendum therefore remains a probability rather than a mere possibility. Of course whatever David Cameron agrees it will split his party. Eurosceptics are already incredulous at the timidity of his agenda. That, allied with the shotgun timetable, is evidence they say, that this is all a great con. If the Prime Minister carries the day the question is whether his incensed backbenchers will seek revenge of a more personal nature. Cameron will not fight the 2020 election and from that point of view he is hirpling to lame duck status. Will his foes attempt to make him a dead duck?

The refugee crisis might not directly impact the discrete nature of the UK's negotiations. But rest assured, come the referendum, the No side will be merciless in exploiting the apparent paralysis and institutional failure to address a humanitarian catastrophe. Yes campaigners will counter by saying that the position would be even worse without a focal point for coordinated action even if it has been far from perfect to date.

Analysis by Bernard Ponsonby, STV's political editor.