Apple advises backing up and erasing your iPhone before it sending in for service:
Get your iPhone, iPad, or iPod touch ready for service - Apple Support
Once your iPhone has been erased, in order to be able to pair it with your Apple Watch again, your Apple Watch will also need to be erased.
I suggest that you unpair your Apple Watch just before backing up and erasing your iPhone, in order that you have an up to date backup of your Apple Watch as at that time - see the support article above, under the heading "Before you send your device".
In order to retain Health and Activity data be sure to back up your iPhone via an encrypted backup. iCloud backups are encrypted as standard. If backing up via iTunes, select the option to Encrypt iPhone backup.
It will not be possible to retain any data that may be accumulated on your Apple Watch between the point at which Activity data was last synced to the iPhone and the iPhone was backed up (via an encrypted backup) and the point at which your Apple Watch is erased and re-paired to your repaired or replaced iPhone.