I would second iMazing. It often can be found on sale. I have found it invaluable since recent iTunes updates have made it less useful for me in managing my device(s.)
For me a few of its features I appreciate are that it easily backs up my device(s), either wired or by wi-fi on a schedule of my choosing. I can archive Apps in case an update causes me grief. I can then easily restore a single App’s saved data.
As far as the original question regarding Messages I just had occasion to need some specific messages from a number of years ago. trying to go backwards years from within the Messages App would drive a person crazy. I used iMazing to extract the entire conversation going back to 2012 - all 5716 pages to a pdf. Opening the pdf it looks exactly like looking at my iPhone’s Messages App. Everything is there. Personally, I find that invaluable. iMazing has done all this seamlessly for me. I have tried a few other “extraction” style applications resulting in varying levels of success but none that I have tried can match iMazing.
One criticism I have of iMazing is the licensing format. You can enter the license a couple of times on your device but then it can lock you out and force contacting iMazing to allow a re-entry of the registration information. I suppose part of this is an effort to prevent piracy. A basic license is also only good for a single machine. Right now iMazing offers a universal license which allows two machines for about $50 USD but I would still think a better deal might be out there from a reputable re-seller.
Just my $.02