The LG Magic Remote is a strange beast, because by default, the signals it sends to LG TVs tend not to be picked up by other IR controls (I don't know if that means it's communicating some other way, or whether the IR frequency it uses is really unusual). As a result, the Apple TV's "Learn Remote" functionality does not work straight away when operating the LG Magic Remote.
Nevertheless, there is a feature of the LG TV to configure its remote to serve as the universal remote of various inputs (i.e. select DVD player on HDMI 2, pick a make, verify it works, and then the remote will start sending IR signals whenever HDMI 2 is active).
The Apple TV is officially not supported by LG (per their phone support) and Apple does appear as a valid make when selecting a remote type. So I figured based on googling, that if I picked any nonsense DVD player, the remote would at least start sending IR signals that could be learned using the Apple TV "Learn Remote" feature.
Those linked threads report success, but in fact their advice of "rapidly mash buttons" for the Apple TV to learn the IR signal didn't work in my case, and I suspect it's a function of the newest 2017 version of the remote (I'm testing on an LG OLED65C7P). I've tried a dozen different "set top box" and "dvd/blu ray" device types, and in each case the IR signal for the arrow buttons is not strong enough for the Apple TV to register them at all.
Any ideas on how to overcome this?