I have found an answer: Turn off "Enable Chrome V8 runtime" for your Apps Script. When this is enabled the failure occurs within 10 transactions, often within the first 3. When this is disabled I have run 400 transactions without a single failure.
After changing this setting you will need to Deploy your script again, even though you have not changed any code.