jmampilly
You didn't consider the powers which didn't take part in the dominion war - such as the tholians, gorn or even ferengi. They most definitely increased their military spending - and their infrastructure was not affected by the war. They are the ones which gained the most power, relative to their previous position.
Also - the federation got pounded throughout the war - its infrastructure and economy included. You compare it with USA after WW2 when you should compare it with UK instead. One doesn't get stronger by being pounded for years, as happened with UK - as opposed to remaining untouched, fighting exclusively on foreign soil, as happened with USA.
The federation economic potential was diminished by the dominion war, not increased.
All this means, the federation position relative to the alpha quadrant non-combatants - indeed, its standing in general - was weakened by the war, not strengthened.
UK actually did quite well after WW2. Much of its loss of market position came after WW1, so war production in this case allowed a small turn around: bombing was contained to certain areas of the country, production centers outside the south (UK's economy was very well decentralized) were emphasized, the government was positioned to rationalized production, and greater emphasis was placed on colonies. However, this last point ended up being a problem: manufacturing centers outside the British Isles themselves gained experience in production that enhanced those areas politically, effecting decolonization over the next several decades.
However, the larger point, that fighting and winning a war is not necessarily an economic boon, is essentially correct. It depends a lot on the specifics of the war, things that we don't get to see. Did the arms buildup lead to the creation of new shipyards in new areas of the Federation? Did the general population gain technical and scientific skills? Those are the question I would like to see answered.
The UK in many respects came out of WWII in a weaker position.
It's cities where blitzed
Rationing didn't end until the 50's for some products
It took circa 50 years or so to repair it's war debt to the US under the lend-lease programme
It started the war in essence as a Super-Power and at best ended the war as a Major-Power.
But back to the topic question, one thing that might have come out of the war was that most of the Major power had lost many of their older ships the ones being more obsolete and came out with fleets of newer types of vessels. With now doubt several other new designs coming off the production lines.