It's definitely possible to match TeX output on the HTML+CSS stack. PrinceXML is roughly there already, rivaling TeX for an output-to-PDF print publishing workflow. Unfortunately it's proprietary and expensive. Of the open-source renderers, the browser engines are probably the best bet to build on.
By 'lowercase numbers', do you mean https://en.wikipedia.org/wiki/Text_figures? I've never heard the term before, and initially wondered if it was some sort of joke, but it would seem not.
Interesting stuff, typography.
CSS is growing to include more typographic details like the ability to specify lowercase numbers, etc., and when the epub spec and ereader renderers catch up to that we'll be doing pretty well for ourselves. Maybe not TeX-well, but pretty damn well.