How to prepare for clean install of OS

You may want to read this thread.

I can’t think of any reason why you should need to clean the CloudKit sync location (unless you no longer know the password for that sync location, that is), or reinstall DTTG on your iPhone.