Use a rollup instead of a lookup. Use the aggregation formula
However, you should also be aware that the commas do not really exist in the lookup field. They are for display purposes only. For example, if you put the lookup value in a formula field concatenated with other text, the commas will disappear. Depending on how you are sending the lookup value to your sms system, those commas might not be getting sent.