const div = document.createElement('div');
const text = (div.innerHTML = html, div.innerText);
или
const text = new DOMParser().parseFromString(html, 'text/html').body.textContent;
или
const text = document.createRange().createContextualFragment(html).textContent;