If your files and photos are in iCloud, then they will remain in iCloud.
It is just the things that are stored on that Mac and not stored somewhere else that you would need to restore from a backup.
Any Library-based programs will not be able to read the newer library from Catalina, e.g. Mail, Music, Photos.
For Mail, if all of the accounts are IMAP or other online storage, you can just add the email accounts to the Mojave Mail and you will not lose anything. If you have email stored in "On My Mac" mailboxes, you will need to export those messages, then reimport to Mail in Mojave.
For Photos, any keywords, titles, or any other metadata you stored with your Photos will be lost. If you are not using Photos in iCloud, then you will need to export all of your photos to files on an external drive. You can then import them back into Mojave Photos.
If you have Contacts stored locally (not in iCloud), then you will need to export them all as vCards. If you have groups set up, export each group of contacts so you can then import them and put them back into your groups.
Your music should be in a Media folder in the Music Library. You can copy that folder to an external, then import them back into iTunes in Mojave.
There are probably more things I have missed.
Sign out of everything iCloud on Catalina before you erase the drive.