CURLE_COULDNT_CONNECT
This error itself is being generated on the client side so your client for whatever reason can't connect to the server, so this means its not a Server API issue (eg you would be getting a 500 or 400 type error in that instance) and it also not related to throttling which would give you a 200 response with a specific error code. EWS (and nearly everything else) are enforcing TLS 1.2 so if for whatever reason your code was dropping the encryption level. I'd also be careful with any proxies that are in the network path that might break it eg one expired SSL certificate in a load balanced array etc.
The place to start would be looking at the client network path so when your getting the error in your code try to access Office365 from another client or application eg if it a Windows machine try the EWS Editor https://github.com/dseph/EwsEditor/releases.