Where should the antecedent for "it" be?
Solution 1:
Finally, the storm ended. Then, the two groups of men reached the centre of the field with their goods to trade. After they did it, each side took what was theirs and went back. In the above paragraph, “did it” refers to “to trade”.
No, it does not. By default, it refers to "they reached the centre of the field", i.e.
the two groups of men reached the centre of the field with their goods. After they had done it, each side took what was theirs and went back.
That is why you need to be explicit. Also "their goods to trade" is a noun phrase where "to trade" acts as an adjective. It means "their trade goods".
Quite apart from the grammar, the sentence is not at all idiomatic.
EDIT I have deleted the last part of this answer to reconsider. There are several problems with your sentence and in my opinion it needs to be substantially rewritten to make sense.