This Belgian bank sends new pin codes by SMS.
Phones delete them after 2 days. How is this achieved?
However, you can set a validity period, after which undelivered messages are supposed to be deleted. Some carriers here in the U.S., however, don't respect that validity period, so there's really no guarantee.
Other than that, I don't think there is a supported way to delete a message that has been received, unless the text message is sent some other way; maybe other apps, like iMessage, WhatsApp, etc., support this?