To solve your refund problem, there is a tab in TripleA at the top of the screen Game >Enable Edit Mode > Add Units.
Provided your opponent is cool, you could do this at your place units phase, or during a subsequent turn. This way at least you don’t lose 20 ipcs on a wasted upgrade that you can’t use.
I think “originally controlled territory” was a pretty poor choice of words in the rulebook, since everyone who reads that confuses the distinction between ‘originally controlled territory’ and ‘starting territories.’ A clearer way to say it might be to add an extra parenthetical line “(only if the territory has your national roundel printed on the map.)”
TripleA does us a favor, acting like a tutorial of sorts, and preventing common mistakes that might otherwise dramatically alter the game. I think we need an official digital game, for reasons exactly like this. Until it comes along, TripleA can be a very useful way to learn a new board.