Have the Taliban defeated the European Union?

My idea was to begin these lines with an evocation of the British Army of the Indus leaving Kabul in 1842, under relentless attack by Afghan tribesmen until every one of the 4,500 soldiers and 12,000 civilians (only one person was spared) in General Elphinstone's caravan was lost. However, the blunt bluntness of the EU's high representative, Josep Borrell, makes my starting point bleakly clear: "The Taliban have won".
The head of European diplomacy was perhaps referring to the war that began on 11 September with the destruction of the Twin Towers in New York. We can infer from his words that the defeated are the United States and also NATO, as the armed wing of the international coalition that the Americans convened to help them. Some of NATO's member states are also member states of the European Union. But the European Union is not a military alliance, just as this war is not, for Europeans, a conventional war, the outcome of which has immediate consequences for the independence, citizens or territorial integrity of the allied countries.
So it is difficult to conclude that the EU has been "defeated" in this war. However, the risk for the EU could come from "losing the peace", understood as the situation that will follow the Taliban takeover of Kabul. Once the problem of evacuations of its own personnel is resolved, the risks of Taliban peace for the EU could be as follows:
Immigration: there are fears of a new mass exodus of Afghans, this time in the direction of Europe. The Syrian crisis has exposed the EU's migration policy. It is very difficult for member states to cope with another wave of migration and accept new quotas of migrants. Moreover, Turkey has already warned that it will not accept any more migrants on its soil in exchange for money. Thus, apart from the tensions that the migration crisis may create in the EU's transit and neighbouring countries, there will be tensions within the European Union with the strengthening of right-wing or left-wing populist movements, depending on how lax or too stringent the common policy is. Further defections of member states for this reason, which would threaten the continuity of the European project, cannot be ruled out.
Terrorism: The Taliban have been quick to declare that the country will not serve as a base for terrorist groups. Even if this is their will, and not a laboratory story to make the new fundamentalist emirate more digestible, there is the looming problem of arms abandoned by the Afghan army. This is billions of euros worth of military hardware, ranging from transport equipment to automatic rifles and night-vision instruments to helicopters and drones! Although experts console themselves by saying that much of this equipment will become obsolete over time for lack of spare parts or proper maintenance, the fact is that it will trigger the black market and the possibility that more versatile infantry weapons, such as automatic rifles, submachine guns, pistols or hand grenades, will fall into the hands of terrorist groups and networks with their sights set on Europe. An upsurge of terrorism in Europe, combined with strong migratory pressure, could deal the death blow to the Schengen area.
Recognition of the new Emirate: Should a regime whose values are radically at odds with those of the European Union be recognised? Many are already calling for "realism", if only to try to salvage the progress made during the twenty years of Western presence. Others suggest a wait-and-see approach and not hindering the country's stabilisation in order to exert some influence later on. But what means does the EU have at its disposal to "guide" the new regime's evolution towards more bearable forms? Afghanistan is highly dependent on foreign aid and the EU is one of the main international donors in the region.
European aid comes in two forms: humanitarian aid, which in the case of Afghanistan focuses on food, health and education. The European Commissioner for Humanitarian Aid, Janez Lenarčič, has already announced that these will not be suspended. In fact, a substantial part of this humanitarian aid has been delivered to Taliban-controlled areas. Development aid is dedicated to financing infrastructure and projects to improve conditions in the recipient country.
They are larger and more protracted than the previous ones, but are subject to "conditionality", a European jargon term familiar to us since the recent economic crisis. If the Taliban are determined to create a viable country, they will need them and the EU will have the opportunity to use its 'soft power' to influence the new emirate.
A less strong Europe in the world: Europe's goal of promoting a rules-based world is certainly damaged by the Taliban emirate, but so is Europe's ability to act on a chessboard where several nuclear (China, Pakistan, Russia, via the bordering CIS republics) or quasi-nuclear (Iran) powers sit on the sidelines. A part of the world, Central Asia, also holds enormous natural resources. Although some have publicly lamented the condescension of certain countries towards the new emirate, the EU will have to sit down and engage in dialogue with China, Russia and even Qatar, as the financial arm of Islamic fundamentalism, if it aspires to have a presence in the region.
Europe's security and military autonomy: It is incomprehensible that, with Europe's extensive diplomatic network and military presence on the ground, the disastrous end of the War on Terrorism could not have been anticipated. This war was primarily led by the Americans (without denying the EU's interest in it, for the reasons given above), once again highlighting the need for autonomous European security in both its military and intelligence aspects.
In a very European political move, the High Representative, Borrell, and the Secretary General of the EU's Foreign Service, Stefano Sannino (former Italian ambassador to Spain and a Socialist), have managed to make Spain the "distribution" centre for former Afghan collaborators in Europe. The Americans have joined this agreement by requesting the use of the Morón and Rota bases for the same purpose. Emergency measures seem to be flowing. For our security and for a world order based on rules and values, in which Europe's voice can be heard, hundreds of EU soldiers have fallen in Afghanistan. It is now up to European politicians and civil society to find the courage and vision to defeat the Taliban's peace.