Intermediate replacements using $replace() aren't really valid unless you know the input. It's fine to say $replace(hello,e,y,l,x,y,l) when you know the word is hello. Because you know that you can use y without complication because it's not in the word, intermediate replacement is a way to do the same thing that $replacex() does. However, if the word or phrase is unknown, you can't do this.
If $1 is hello, then this is true:
$replace($1,e,y,l,x,y,l) = $replacex($1,e,l,l,x)
However, if $1 is yes, then it is not true (the "y" will be different from one to the next).
You can use intermediary replacement using characters that are not expected within the unknown text and often that can work, but anytime you do not know 100% what the text will be, intermediary replacement is hit or miss. That is why $replacex() is very much needed.