There is, on the other hand, a documented RS-232 protocol supported across many of LG's smart and "dumb" TVs that supports these things and more, so I threw together a trivial HTTP wrapper
https://github.com/jasminetroll/LgTvControl
that I use to control various TV settings via keyboard commands and Apple remote.
As a significant bonus, the RS-232 API has a "disable/enable OSD" command, so I can adjust brightness and switch between inputs without an annoying, oversized OSD window covering up a significant portion of the screen for several seconds telling me what I either already know from the resulting display (switched input to, e.g., the GPU connected to my Linux desktop VM) or don't care about (the numerical value of backlight brightness resulting from the latest up/down button press).