$ echo '<ul><li><table><tr><td>foo</td></tr></table>' | php bin/parse.php --html2wt | php bin/parse.php --wt2html --normalize <ul> <li>{| |foo |}</li> </ul>
The problem here is the first step:
$ echo '<ul><li><table><tr><td>foo</td></tr></table>' | php bin/parse.php --html2wt * {| |foo |}
Parsoid seems to realize that this content can't have newlines inserted; see:
$ echo '<ul><li><table><tr><td>foo</td></tr><tr><td>bar</td></tr></table>' | php bin/parse.php --html2wt * {| |foo |- |bar |}
...but it doesn't realize that the newlines are necessary in order to make this valid table content.
Parsoid *should* convert from * representation for the list item to explicit HTML tag representation (<li>), but this means changing the representation for all items in the list.
Depending on the outcome of T230683, we could use heredoc syntax for the content instead of suppressing newlines.