You can back up messages on an iPhone to your iCloud account, or sync messages from your iPhone to your Mac.
Unboxing a new iPhone shouldn't make you anxious about whether your information will safely transfer to the new phone. These are the ways to do it easily and safely.
If you need to reset your iPhone to factory settings to resolve an issue, you can back it up to iCloud first and then restore ...
I've heard your pleas, and have had them myself. For iPhone owners who also use Windows, sending and receiving Messages from your desktop can take some finessing. I'll show you how I got it to work.