At a previous job, a coworker presented a compelling argument for removing "whitelist" and "blacklist" terminology from our codebases / jargon. Even though the etymologies of the words don't describe them as being based on race / racial judgments, their first recorded usages were in the 16th-17th centuries, when mass enslavement was in full swing. Setting aside the historical context, they also help reenforce the idea of "white is good, black is bad" [0].
At that job we moved to terms like excludeList, allowList, denyList, etc.
This doesn't directly answer your question, but there's a nice SMS interface framework available for Django called RapidSMS[0]. It's been a few years since I've played with it, and never got around to testing "in the wild" / with a real phone, but, it makes the Request/Response <-> SMS gateway mapping pretty easy to navigate