I haven't messed around with this stuff in a while, but I don't think the engine is that far from a simplified version of this.
A condition checks if a battle happened in a certain territory this turn.
A condition checks if there is a German infantry in that territory
At some point in Germany's turn, a trigger removes the infantry and places one infantry_veteran.
Repeat for all nations, territories, and unit types. You can get this to repeat a few times, so you can get more than veteran infantry from a single battle, but the amount of triggers needed starts to get crazy.
You should be able to set up a system for defenders too, but I don't think its possible to do this for a unit which attacked and retreated to a different territory. I would just that make that part of the rule though (no glory for those who retreat!)