Earlier quoted context omitted.
The EU was created in 1993, not sure how at that time colonies were anywhere relevant to the creation. The starting point was the European Coal and Steel Communion in 1951 (conceived 1950, with France, W Germany, Belgium, Italy, Luxembourg, and the Netherlands) which had as an objective to create lasting peace between France and Germany by making it practically impossible from resource pooling to go to war.
The EU is the continuation of the efforts at integration started in the 1950s. It took the loss of the colonies to really cement the future economic integration. The idea that economic integration prevents war has been fairly well shattered by Russia's warmongering. There are often reasons cited that sound good to the public, but these are not necessarily the same as the true reasons that really motivate the actions…
WWI also showed that economic integration doesn't always prevent wars, Russia recently isn't a great example, because the integration was pretty limited.