Is it a good idea to route network traffic from an LXD container through Tor in another LXD container?

This would be an implementation of isolating proxy.

Shall I just stick to virtual machines for Tor isolating proxy?

You need to achieve two things here. Do the networking that is required by the isolating proxy using LXD using virtual interfaces, and then setup the workstation to show the GUI apps in a Xephyr window.

If you can do the first part, I can help you with the second.

How secure would LXD be, compared to qemu/KVM?

In theory, if a malware utilizes kernel vulnerabilities, it can break out of a container and leak network packets.

There are no known security vulnerabilities.
LXD (and other containers like LXC, Docker) use Linux kernel security features, while KVM uses hardware virtualization features.

The benefit of using containers is that it makes the setup more lightweight, you can set it up fast and tear it apart equally fast.

When you manage to put all pieces together, it is good to publish the guide so that others can try and figure out any improvements.

Let’s assume that I figured out how to create an isolating proxy with LXD.

To view windows on Xephyr window, would the host and a container need to communicate via an IP socket without going through tor container? If they would, then network packets could leak.

The communication with Xephyr will be over a Unix socket, which is not IP addressable. On this socket there will be only the Xephyr server, without given access to the rest of the window system.