This is a cut and paste of my Apple post on the topic:
Settings -> Notifications -> Messages -> Show Previews -> OFF (gray switch, NOT green).
Alert style when unlocked set to "none"..
iIf what has been reported on Reddit is true and it is the text string being fed to banners that is crashing the phones, these are the settings I've had on my phone that kept it from effecting me when my son tested it on my phone.
Do the above and the malicious text string can not crash your phone.
BTW, I have tested the above on other iPhones and these setting changes have worked on all of them. It results in the malicious string being unable to crash them.