I'm going to branch off of what Puppetsock posted and get a bit more theoretical. While he's absolutely correct that economic expansion in the conditions of the first world war is extremely unlikely, you could get more 'alternate history' and make those conditions more agreeable.
The main issue that made WW1 so bloody was that military leadership hadn't really adjusted to the realities of warfare in an industrial environment. The combination of 19th century tactics and 20th century weaponry created massive death tolls, due to the fact that modern artillery and automatic weaponry made attacking an entrenched enemy extremely costly, but political motivations required both sides to keep attempting it anyway.
However, if you postulate political conditions on both sides that allow for less pressure on military leadership for quick victories, then a scenario more compatible with your ideas is possible.
You keep the entrenched defenses that both sides established early in the war, but each side is focused purely on defense, with neither side willing to risk massive losses to press an attack. Instead of having to devote resources to constantly replacing battlefield losses, each side devotes their primary energies to trying to find technological solutions that allow them to break the defenses on the other side conclusively and without risk of mass casualties.
This requires two fundamental changes from how things actually went down:
First: Defensive weapons technology has to stay ahead of offensive weapons technology. This is particularly critical with regard to long-range artillery and aircraft. You can't have industrial and technological growth driven by military conflict if your cities are being shelled and bombed. Earlier development and wider adoption of radar would serve both purposes very well, for example, making it easier to shoot down enemy aircraft and destroy enemy artillery before they have a chance to do much damage to civilian targets.
Second: Both sides have to be able to maintain a wartime economy indefinitely. This means continuous uninterrupted access to all the critical raw materials needed to keep the factories going. Iron, Petroleum, Copper, Rubber, etc. In both WW1 and WW2 the German forces had key resources that they were going to run out of if they didn't win quickly, which drove the need for quick victories at all costs. If both sides are comfortably supplied, than neither will be willing to risk upsetting the status quo unless they have an absolutely insurmountable advantage.
Combining these two factors allows both sides to be potentially able to realize the kind of economic benefits that the United States did during both World Wars. The war provided the political and economic motivation to devote far more resources to industrial and technological development than would otherwise have been possible, yet the United States did not suffer the kind of manpower and infrastructure losses that the rest of Europe did. As long as everything stays in balance, you have a steampunkish equivalent to the Cold War where everybody is preparing for a war that nobody REALLY believes is actually going to happen.