We were able to track down the cause.
We are using the webanalytics plugin which injects a Google Tag Manager Tag, without that tag, everything works fine.
So it wasn't really a Moodle issue.
General developer forum
Sporadic Javascript Loading Errors
This discussion has been locked so you can no longer reply to it.