They might mean attachments too, which I count as whole message history.
Messages seems to be somewhat random about keeping/removing attachments from your devices regardless of how much storage you have free or whether you have 'Optimise Storage' off.
*note this is specifically when using Messages with iCloud
I previously kept copies of this SQLite database on hand when backing up my phone (it stores to a specific folder every time), but since encrypted backups were introduced a few iOS versions ago, I found it too much of a hassle.
If OP wants to find this file, a good search term is "3d0d7e5fb2ce288813306e4d4636395e047a3d28" which apparently is a sum of the string "HomeDomain-Library/SMS/sms.db".
One thing I miss from Android was the simplicity of getting data in and out of the phone. I could just dump everything to CSV and be done with it.
This is confidently incorrect.
The entire database is stored on device in a SQLite database. It absolutely has a terrible UI for fetching messages, but they’re all there.