On the path to replacing Tidy ( T89331 ), one of the tasks is to deal with empty-element removal which will no longer be supported. https://gerrit.wikimedia.org/r/#/c/246148/ found a way to prevent Tidy from stripping empty-<li> elements which are now being hidden via CSS to preserve existing rendering. However, longer term, it makes sense to start fixing pages and templates to not rely on empty elements being stripped.
Towards this, it seems the accepted practice is to emit tracking categories to pages that need fixup. It should be simple to do this in the core parser.