can't we clear the innerHTML of the driver time to time to reduce DOM size?
driver.execute_script("document.body.innerHTML = '';")