Neither pixels nor ems are the right solution, and a side-effect of an era of low-resolution screens, what we need is real
physical units, and not just for fonts, but for every UI element. I should be to say that a button is intended to be an inch tall (or 2cm or whatever) -- the point is that it should have a height relative to reality, not relative to nothing. Imagine if anything else worked like dimensions in software: you asked for chair 3 feet tall but every maker of chairs had a different definition of a foot. This is how points, pixels, everything works on the web. And the most important thing to remember here is if you still like this system, you can
build it on top of one that fundamentally relies on real units at the bottom. But it is incredibly difficult to do the reverse. CSS has "in" and "cm", but they
don't mean inch or centimeter. On most browsers, "1 in" is defined as 96 (CSS) pixels[1].
Except, if you print, then 1 inch DOES mean 1 inch. Which hilariously means that if you want to use CSS to lay out something to print, you can't tell how it will actually look until you print, because there's no "please just render like you would when you print" mode. This has been requested, and the classic answer of "who would ever want that" was the response. You can with a lot of work (and JS unfortunately, unless you pre-generate a huge CSS media query for a wide range of screen resolutions) create yourself a unit such that 1em = 1 physical unit, but this has other issues when you start wanting to do other things in CSS.
Screen UI is the only aspect of design where we pretend that precision shouldn't matter. It is stockholm's syndrome. I remember how people said that its fine (or better?!) that you can't know "for sure" what font will display on the screen on the web. MAYBE it's Times New Roman, but maybe not! You should be flexible. This is nonsense. Perhaps that's the reality we live, but it's not desirable. We shouldn't fool ourselves into preferring that. Clearly if we could make the exact font show up it would be a better state of affairs. Again, if you really believe font uncertainty is critical to the web experience, then by all means, add a script that randomly swaps in a different serif font occasionally. Boom, everyone is happy!
Dimensions is the same kind of problem: we're using ideas from an age where screen were 256 pixels wide. When you design for print, you think about actual size of the produced object. Just because someone can resize the window does not mean that the height of the letter x should be some abstract unknowable quantity. And just because you can set the baseline in size to a specific physical size doesn't mean users can't apply a zoom to that. All it means is that the language with which we communicate to each other is real and not completely different depending on who is reading it.