@Cernel Mind you that, this way, removed attacking units will turn into zombies owned by the attacking player, if you retreat, or owned by the defending player, if you lose the battle without retreating.
For the losing battle without retreating part, you can have a trigger conquering the territory in favour of the "Zombies" player before the infrastructure unit repairs and, immediately thereafter, another trigger re-establishing ownership without conquering the territory (just check that a battle has happened for the attacker but the territory is owned by an enemy of the attacker, if you have a basic 2 sides scenario).
For the retreat part, you can hack it by having the intermediate infrastructure unit being a movement 0 air unit (so it won't retreat with the rest and will never move out of it), but I personally strongly disagree on the current behaviour that attacking air infrastructures are conquered (since they are hovering the territory, they should not be influenced by any ownership changes, until after they landed on it, which they never can) (I believe a @Frostion map uses this behaviour for Nuke, if I recall correctly, but I consider this being a case of exploiting a wrong engine behaviour (bug)).