Good Morning,
I think this problem will be easily achieved by using Regular Expressions and little bit of code for some edge cases.
I'm a Computer Engineering Student at University of Minho and I'll ingress my Masters this year.
I have a strong background with Regular expressions and use them on my daily basis to do large number of substitutions as I code and actually had a class only about Language Processing.
Note that this will be my first job as a freelancer and that I don't have experience with bulk A2P SMS or SMS gateways so I'll take my time and figure out what's the best approach.
If you have any question please don't hesitate asking.
Best regards,
Armando Santos