If you really need to take this approach, there's not even a need to escape anything.
Just use new_s.innerText = '<example>';.
new_s.innerText = '<example>';
const myText = "<example>"; new_s.innerText = myText;
<div id="new_s"></div>