The number of villagers seems to increase over time in the last fight. Also those laser weapons don't do much versus wood but pass through humans and they even affect metal. When they came to the planet they had more ships and more tanks than the farmers fought off; without them sending the second wave. The motherworld's army was worse than a novice army at attacking, they could barely aim, no ducking, dodging, using terrain to their advantage.
It isn't likely that the farmers would manage to build the massive trench around the farm in the two days between finishing the harvest and the arrival of the King's Gaze.