The EU is 450 million people! It's the size of the entire continent of south america! It was the richest part of the world for centuries! They absolutely should be able to function as an independent block with international trade for convenience and not survival.
Not even the US can stand against China by itself...
The EU still has a large military industrial base getting revitalised as we speak, it didn't rot, it simply didn't need to pump out massive amounts of gear until this point.
Poland, Germany, France, Spain, Italy, Sweden, Finland, Czechia, etc. all have different kinds of weapons manufacturers. You can even include the UK, and Norway in the mix even though they aren't in the EU.
No, the EU obviously did need to pump out massive amounts of gear, and failed to, and that's why four years into a war, Ukraine is still suffering under the yoke of a country with 1/10th the GDP of the EU.
If the EU had taken their responsibilities seriously given the MASSIVE THREAT next door, Ukraine would have had massive ordinance dumped on it in March 2022 and been free of Russians by Christmas.
It failed for political reasons. Political leaders being afraid to get involved in the war. Also do not rule out right wing political parties that are often anti-Ukraine and pro-Russia due to being sponsord by Russia.
The USA also has had it share of preventing the EU from getting involved.
China has a population of 1.4B people yet they import huge quantities of fuel and food and we can't pretend that they lacked investments in core industries.
That may actually be an advantage: position Europe as a neutral block that trades with everybody, and it may actually be valuable enough as a neutral that anytime one of those three has designs on it, the other two would naturally have to combine to thwart them.