Sure the primary use case for many years was to cope with low-resolution but it can be used in the way the poster above described. In fact you can use it in the other direction too so that larger sizes take on more specific characteristics instead of having two fonts and a hack that switches at 20pt like they're doing with San Francisco.
Source: Have actually TrueType hinted fonts.
It's totally possible to create a safe virtual machine for specific uses. There have been many attack vectors for fonts over the years due to the complexity in parsing them. I do not recall any of them being due to the hinting language.
The Mac one is hard coded for a single OS and font combination and a specific size down in the operating system.
I disagree that the later is less of a hack.
In practice, type designers found that making such fonts took dramatically more work, and typographers/publishers weren’t willing to pay commensurately more money. So it didn’t see much adoption outside Adobe.
As a result, the format died out, and we stuck with descendants of the original PostScript font format.
More recently, many companies (but especially Adobe) ship “pro” typefaces with separate fonts for various “optical sizes”. Again, producing these takes a lot of extra work, so most type designers don’t bother with it, and because it is designed to work with standard tools (which don’t have special knowledge of the feature), typographers/designers must explicitly choose which optical size they want to use in each context. So in theory it’s inferior to the Multiple Master format, but in practice it is backwards compatible, which ends up being more important.
Apple can solve this problem for their UI fonts specifically, because they have full control. Unfortunately, they haven’t offered these features for use with other typefaces.
TrueType hints are restricted programs stored as bytecode. One instruction, MPPEM, requests the pixels per em. Another instruction, MPS, gets the current point size. There are also instructions to find pixel lengths across various axes. I'd have to think about the details but it should be possible to estimate the DPI and physical glyph size from those and then adjust the hinting accordingly.