Hello fosslinux. I am the alex who wrote the alex.lxd post you mentioned.
Now please check this (newer) post of mine: A way to resolve container.lxd from host, in all cases
It contains what I see as a “perfect solution” which is simple and works everytime everywhere. I use that and am happy.