There are several mechanisms to move money [0], just the free movement of labor alone has transferred a lot of money from Germany further to eastern Europe for decades already.
I fail to see how military exports would be better than that, defense products are not "money", they serve no productive purpose at all in any country that's not at war.
It should also be noted that Germany is among the biggest weapons exporters on this planet [1] and quite a big chunk of Greece debt boiled down to liabilities for military hardware from other EU members [2].
[0] https://en.wikipedia.org/wiki/Free_trade_areas_in_Europe
[1] https://www.aljazeera.com/indepth/interactive/2017/02/10-cou...
[2] https://www.telegraph.co.uk/news/worldnews/europe/greece/912...