That’s partially right but misses cgroups.
lxc exec attaches to the container and will - ignoring cgroup2 specialties which do not apply - move itself into init’s cgroup usually, i.e. it’ll attach to the same cgroup that init is usually in since init (systemd) will not move itself into a separate cgroup for the memory hierarchy:
root@b1:~# grep memory /proc/self/cgroup
9:memory:/
root@b1:~# grep memory /proc/1/cgroup
9:memory:/
So the oom killer sees a big fat cgroup and starts killing of tasks in the cgroup. But the memory killer will usually not just kill a single task it will kill multiple. So it starts with the fattest one which should be the one that goes over the memory limit but it then immediately finds the next fattest process which will usually be systemd-<some-daemon> and then another one almost guaranteed to hit systemd itself at some point taking down the container.