The Germans have no destroyer present, therefore the defending air units can not hit the sub, and of course the sub can never hit planes. Think of it in terms of the combined arms rule, air units can only hit subs if they are combined with at least 1 participating destroyer, the difference with this particular combined arms is that it works while attacking and defending. In the scenario that you described, the sub would destroy the remaining transport without rolling and the defending fighters can do nothing.
Factory capture question
-
Is the damage on a factory erased it you capture a factory that you damaged
-
Afraid not. However, if you capture a Major Factory with more than 6 damage , it becomes (is downgraded to) a Minor with just 6 damage.
-