This is how I built the spindle's switching cabinet. It contains components like variable frequency drive, mains filter, brake resistor, fan power supply, delayed fan start relay etc.
Here's the background story: https://blog.schallbert.de/projects-hardware/spindle-upgrade/ And here is how I tested the setup: https://blog.schallbert.de/testing-hardware/
At time of upload, the spindle runs smoothly for half a year on my setup (~80 jobs). No issues so far.