@kao
There are two properties that I know of that deal with contested territories:

<!-- Any territory that contains enemy units will not produce any income or resources -->
<property name="Contested Territories Produce No Income" value="false" editable="false">
<boolean/>
</property>
<!-- Any territory abandoned may be taken over by the remaining units on the same turn it was abandoned on. Also includes if a territory is attacked and both all the attackers and all defenders die, then any other player with combat units will take over the territory. -->
<property name="Abandoned Territories May Be Taken Over Immediately" value="false" editable="false">
<boolean/>
</property>

I left the POS2 comments in so that you may read what is stated about these properties.

As directly affecting factory production, the first property might help, but I don't see anything the directly relates to a factory in a contested territory.