A reset will erase all user-installed apps, all app data and put all settings to their default values. It won't undo any system updates.
So yes, contacts, messages, photos, everything in the internal storage will need to be backed up.
Contacts will be backed up already if they are synced with Google. Otherwise you can "export" them from the contacts app (look in its settings) and copy the backup file to somewhere safe. There are many message backup apps. Some apps (e.g. WhatsApp) can do their own backups. You can set to save app data to Google servers, but I'd always prefer an additional backup. Helium (from the Play Store) is probably as good as you can do without root. And remember that any backup must be copied to a different device to be safe.