Unfortunately I am not aware of any tool to remove HTML elements automatically as it changes the primary structure of the website. One of the tool to help keep your website small is PurgeCSS. It will remove any unused CSS rules and only outputs the used ones.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence