*cheers* Welcome back TNO!
Your announcment that you're (at least somewhat) back to enhancing TOTPP even further is great news - a great start into 2018
The next major release (so that's after bug fixing), will get some new Lua triggers. One of them will trigger at the end of combat, and it will allow you to prevent the losing unit to be destroyed. So that's basically what you want
The comment about the lua triggers means I don't have to ask one dumb question I had in my mind

- if you could comment sometime which triggers are feasible in principle that would be great. I remember that a "KeyPressed" Trigger or something, which would be one of the most flexible interactions I can think about, is almost impossible, but if a "on-unit-blinks" or something which allows quasi-continuous scanning is possible that would allow fantastic possibilities already ...
If I may restate two questions from ages ago - would it be possible to define something like a "on the fly" hex functionality, like a "byte(i)" method for a unit or city object, that allows the i'th byte as described in Catfish's Save game structure to be "set" and "get"? (I'm going on a limb here and speculating that the save game structure maps to the basic memory structure of the game? Perhaps thats complete nonsense anyway ...)
Of course that's a highly dangerous path, but it would allow massive flexibility without you having to provide additional interfaces in lua - and scenario/event writers could try and see what would help in scenarios and this could then be implemented in a structured way in the future ...
And do you think it might be possible to define units such that the function a bit like the privateer unit in Colonization - it can always attack and always be attacked without triggering a breaking of treaties? This could be simulated by having it appear as a Barbarian unit for all purposes of attack etc (but of course not when checking for unit commands etc).
EDIT: Sorry, please strike the following stupid question
And one final question - in case the "byte" idea does not work, do you think it is possible to modify the unit.location method such that it can also be "set"? Or would this create to much havoc behind the scenes?
Would allow a nifty teleporting feature, e.g. to connect maps along the east-west axis etc 
- I overlooked
civ.teleportUnit(unit, tile)
which is of course the perfect solution!
