Hi,
Putting everything on the wall or on the end of the lathe should be possible, acceptable and probably preferred. However, where ever you put it shorter cables are always preferred. Most folks put both the control electronics and the VFD in the same box so that the wires to and from the VFD and control electronics do not have to run around the room. In this manner you would have power from the breaker to the VFD in the enclosure and then going to the motor directly from the enclosure. While signal wires coming from and to the lathe would travel to the external box via a separate path. Never, put the signal wires in the same conduit that you put the power through.
So you currently have both power and control wires running back and forth between two boxes and this is not the best approach, anyway. In my many years of electronics, once safety is ensured, my guiding rule is for wires to be as short as possible to avoid interference with low level signal wires and not to physically over lap (parallel nor crossing, but shielding can help here) the wires with the noise generating wires (power wires mostly). If they have to be run along side each other, then keep them as separate as possible. Shielding on the signal wires is usually required, so multiple metal conduits would help. Safety WRT the power wires may mean that you have to put them in a conduit, or at lease have them in a very well insulated cable. I used a rubber cable to bring power to my enclosure, which is at the back of my PM1440GT.
I put my lathe on casters just so I could roll it out if absolutely needed. I then built my VFD conversion, got it working, and then rolled the lathe into position close to the wall. Then I used the lathe feet to lift the lathe off of the casters and to level it. It turns out that I have had to get into the back of the lathe (the enclosure) to work on things a couple of times and I have been able to do this without moving the lathe, but it is cramped, but since I used plug-in style connectors for most of the controls I could just unplug the wires, then pull the circuit board from the DIN rails and have the electronics to work on elsewhere. If I had to do major work I would roll the lathe out. Leveling it did not take that long. So I have a flexible, well, insulate heavy gauge rubber (big) power cable coming from my wall switch to the lathe. It is long enough to allow me to roll the lathe several feet from the wall and still be hooked up to power. All the other power wires are internal, but run only short distances.
If you look at photo 8a of my VFD posting you will see the end of the yellow rubber cable going into the lathe.
VFD conversion using solid state electronic components.
Good luck.