It is difficult for me to tell where the water is coming from... but if you can use some logs, rocks and mud to build up some berms (a few meters beyond the trenches on the uphill sides where the water is coming from) you may be able to divert the water (if it is on the surface of the ground) before it reaches either the trenches or the cabin.
Basically you would be building what are called 'water-breaks' to shed the water elsewhere. Ideally you want to position the berms in such a way that they are at a thirteen degree angle to best shed the water from the areas that you do not want it getting into.
That's great advice, thanks. We'll try getting some defences like you mention up before next winter, it seems the worst already happened for now.
You are quite welcome! That is good to hear that the worst is over. 🤠