The first thing I would suggest is do a complete backup of all SMS (use an app), then copy the memory of your phone identically. Try a restore and then just re-copy the messages and see if that helps. Does it? Most likely an app that has access to SMS.
I have not had this issue, but played around with custom SMS handlers and noted a few issues, nothing as far as deletion. In all of your above cases there needs to be a common link- bad software? Unlikely, thousands of people use this. What phone are you using, root/mods? But yes, I would use something to backup SMS on perhaps a daily routine. Perhaps find the directory of the SMS, and use Tasker/AutoMateIt to create a script to copy data from there elsewhere, and then upload etc.
In the even that this has issues, use a third party SMS client for secure SMS. I do have a question however....anyone know how to default SMS from a contact to securebox?