Same problem running 17.2 release. Hundreds of messages reported on icloud only 4 messages on my idevices. Deleted all deleted messages and manually synced to icloud with no success. Apple clearly doesn’t now how to do cloud programming and should at least offer an option to clear the icloud cache in its cloud.