Well, I implemented it a few weeks ago... replaced '$$' with '\b' before doing variable expansion, and replaced '\b' with '$' after variable expansion.
It did not work, and that was because the same string was being expanded again.
One could leave the "special char" as it is, or one could substitute back to the escape sequence. That would work, but then client code would have to manually strip each string as the last thing, which is not good (error-prone).