If you receive "iCloud encountered an error while trying to connect to the server" with a Apple Business Essentials Managed account logging into iCloud over the web, this is usually because the account hasn't been properly initialized with an Apple device.
My client has an edge case where they needed iCloud for an Apple project but didn't have any Apple devices.
To remedy this issue, login to the managed account on an iPhone/iPad in General > VPN & Device Management
You can simply log in and the log out and that is enough to fix this issue.