If you post some concrete examples of the markup that doesn't get parsed as expected, I can look into it.
If you have invalid HTML, it's probably best to fix it with a specialized tool beforehand. I think HTMLPurifier used to do that, not sure whether it works with modern PHP. Otherwise, PHP's own ext/dom can do some fixing when loading the markup into a DOMDocument.
By default, HTML content rules are enforced but you can specify your own manually. It's probably laborious and I wouldn't recommend it at that scale.
The HTMLEntities plugin exists to accept HTML entities as input, it will output Unicode characters.
$configurator = new s9e\TextFormatter\Configurator;
$configurator->HTMLElements->allowElement('img');
$configurator->HTMLElements->allowAttribute('img', 'src');
$configurator->HTMLElements->allowElement('br');
$configurator->HTMLElements->allowElement('span');
$configurator->HTMLElements->allowElement('div');
$configurator->HTMLEntities;
$configurator->tags['html:span']->rules->allowChild('html:div');
extract($configurator->finalize());
$text = '<img src=img.png><br><span><div>.. ..';
$xml = $parser->parse($text);
$html = $renderer->render($xml);
die("$xml\n\n$html");
<r xmlns:html="urn:s9e:TextFormatter:html"><html:img src="img.png"><img src=img.png></html:img><html:br><br></html:br><html:span><s><span></s><html:div><s><div></s>..<HE char=" ">&nbsp;</HE>..</html:div></html:span></r>
<img src="img.png"><br><span><div>.. ..</div></span>