Error upgrading Magento 2.3.5-p1 to 2.4.0

Magento say it should work with PHP 7.3, but has not been tested.

Magento supports PHP 7.4.0. You can install Magento 2.4.0 with 7.3, but it is not tested or recommended. It is intended for upgrading from Magento 2.3.x to Magento 2.4.0. Ref

Having not tried to upgrade from 3.3.5 to 2.4.0, I have no experience to fall back, like expected behaviour etc… However, I still stand by my original evaluation of the issue for now as I’ve experienced that issue before when upgrading from 2.2.x to 2.3.x without first upgrading my version of PHP.

According to IonCube, they do reference PHP 7.4 in their latest versions. Perhaps upgrade IonCode first and start from there?

29th Jun 2020 - Loader version 10.4.0
Loaders for PHP 7.4. These will run files produced by the PHP 7.1 and 7.2 encoders.
Fix for an issue with the encoded_paths ini setting on Windows. Ref

Either way, it might be one of those situations where you get your monies worth and get a Cloudways ticket started.