On a couple of MW.org pages linking to it, "ReplaceSet" is promoted as "an excellent substitute for using nested #replace commands when you need to perform a sequence of replaces on a single text string." Before you ask, I'm aware it's marked as "unmaintained", but it actually worked when I deployed it last October on the original ByetHost trial version of my creative-venture wiki (so that may be enough to give it a pass).
An example of ReplaceSet in action, to use an approximation of a specimen from that early phase of development:
{{#replaceset:Hello:CM world:XM|:CM=,|:XM=!}} → Hello, world!
...a sneak peek of what to expect in my site's next custom namespace, "Corpus", which collects various quotations, extracts, texts, and sentences for enrichment of the Tovasala Dictionary, one of its several sections. (Tovasala, né Relformaide, is my five-year-old constructed-language [conlang] project.)
In case this doesn't get approved, I would appreciate any workarounds. Take care!