I agree that people will get around it with individual nations. There should also be a cap on individual stockpiles.
1) Even if an alliance's stockpile gets zeroed, they still have all their cities. And they often can get loans after a war. Even starting with nothing, infra is relatively cheap.
2) If the caps are set at a decent level, they could balance things out in favor of losers by limiting how much of a stockpile the winner of the war has after the war, and thus the disparity between the alliances.
Right now many alliances have banks that have several months of stockpiled resources. If we have caps, alliances at peace will hit the stockpile and then have to invest elsewhere. Starting a war, buying more cities, and in their newer players. A rough illustration: Currently: Alliance A is twice the size of Alliance B and defeats Alliance B in a war. Both alliances go into the war with 6 months worth of stockpiled cash/resources. They fight for 3 months. Alliance A uses 1 months worth of stockpile to fight and 1 months worth to rebuild. Alliance B uses 3 months worth of stockpile to fight and 2 months worth to rebuild. Alliance A ends with 4 months worth of stockpiling left, Alliance B with 1 month. Alliance A now has a 3 month stockpile advantage. Alliance A takes 2 months to rebuild their stockpile and Alliance B takes 5 months.
With Caps: Alliance A is twice the size of Alliance B and defeats Alliance B in a war. Both alliances go into the war capped at 2 months worth of stockpiled cash/resources. They fight for 1.5 months. Alliance A uses .5 months of stockpile to fight and .5 months of stockpile to rebuild. Alliance B uses 1.5 months worth to fight and .5 to rebuild (1 month less than they need). Alliance A has 1 months stockpile left and Alliance B has 0. Because they couldn't do a full rebuild, Alliance B takes an extra month to rebuild without stockpiling again. Alliance A has a 2 month stockpile advantage on Alliance B. Alliance A takes 1 month to rebuild their stockpile and Alliance B takes 3 months.
This is of course an oversimplification in a lot of ways. But the point is, if warchests are capped, it limits how much of a warchest advantage one alliance can accumulate over another by setting a maximum for the winner. It sets a maximum amount of time that an alliance effectively needs to be "war-ready" again.