Я бы так попробовал
const changeText = (node, textrepl, textnew) => {
const type = node.nodeType;
const tag = node.tagName;
if ((type == 1 && tag !== 'SCRIPT' && tag !== 'STYLE') || type == 3 || type == 9) {
const childs = node.childNodes;
if (childs.length) {
Array.prototype.forEach.call(childs, nd => changeText(nd, textrepl, textnew));
} else {
node.textContent= node.textContent.replace(new RegExp(textrepl,'g'), textnew);
}
}
}
changeText (document.documentElement, "000-00-00", "111-11-11")
console.log(document.documentElement.textContent);