This is not correct. Apple's page explaining their iCloud encryption states that they use end-to-end encryption only for a few specific types of data, and only if you enable two factor authentication. iMessage in particular explicitly sends its encryption keys to iCloud (so that iCloud can unlock your messages if you lose your device, but of course this means iCloud can unlock your messages for any other reason without your knowledge). https://support.apple.com/en-us/HT202303