Hi,
On the Mac the App does "store" the "history" to the iMessages so that they reappear when you reconnect to that person (providing it is the same ID/iPhone Numbers involved).
It is supposed to be similar on the iPhone but I don't rely on mine so much as the Mac so I can't really say as I only delete conversation on the iPhone much later.
The Mac version can also use the Save option (which comes from iChat really) and stores a different copy deep within the Home Folder/Library/Containers set up.
I really struggle to see the sense in this, particularly as the iMessages "history" storage is not so deep.
I have seem other people post that deleting older posts to make the app start an new conversation with the correct ID/iPhone info as well.
I have not had to do this myself but I do note my Mac is set to "Start Conversation From" using the Apple ID and the iPhone from the iPhone Number.
This does mean that if I iMessages th iPhone (it's number) then I get sync copies of the iMessages and the iPhone lists two conversations (which appear to be the one to the iPhone Number and the Apple ID sync version despite both "side" of the conversation being in each chat).
When you start using multiple IDs and iPhone numbers linked to the same Account it can be difficult to maintain an understanding of which iMessages are going where.
I had two iPhones (i.e. two Numbers). I have my Original Apple ID which I have linked to iCloud and got an @me.com ID (and a later @iCloud one).
I used the Original one on one iPhone and the @me.com on the other (iMessages sees them as separate IDs).
However it did not give me the separation that I expected and I removed the Second Apple ID from the second iPhone.
That iPhone still lists it's Number but the @me.com ID keep also appearing in Pop ups to be accepted on the Mac and on the iPhone it was on and my iPad.
Even when you say No to the pop ups the ID is still added to the Receive At list on the Mac and the Send and Receive on the iPhone and iPad but it remains Inactive.
On the iOS devices you can remove it but it is a little more difficult on the Mac.
As to "losing" iMessages both the Mac version and iOS version will turn the Contact Red if the server can't currently "see" them as being On-Line.
There is limited Off Line saving of iMessages and tends to only happen when devices are set up to Sync.
I can't speak for the Teleco's SMS abilities on Off Line storage but most mainland ones seems to support it.

8:40 pm Monday; November 16, 2015
iMac 2.5Ghz i5 2011 (Mavericks 10.9)
G4/1GhzDual MDD (Leopard 10.5.8)
MacBookPro 2Gb (Snow Leopard 10.6.8)
Mac OS X (10.6.8),
Couple of iPhones and an iPad