The EU isn’t needed to prevent war in Europe
The argument that the EU and its predecessor, the EEC, have prevented war in Europe is completely spurious. You might as well claim that the Commonwealth has prevented a war between Australia and New Zealand.
What conceivable reason has there been for a war in post-war Western Europe, between who and about what? In particular, post-war Western Germany emerged as a peaceful democracy, which acknowledged the terrible things done in her name under National Socialism and tried to make amends.
The post-war military threat to Western Europe came from the Soviet Union and her Warsaw Pact allies and it was Nato, which included countries not in the EEC/EU, which countered this threat. The EEC/EU was irrelevant to the military situation.
But the EU certainly failed to stop the bitter ethnic wars that ravaged former Yugoslavia when that state disintegrated.