The steps @BLKKROW has taken are solid protective measures. You should also try to get your humidity level in your work space to approx 45%. If you want to know the why these work and how, read on to the description I wrote below.
Bonding (the electrical term for connecting components together) will eliminate the difference of potential between them. much like a sloped surface will shed water, static will transfer from a higher potential to a lower potential. Think rubbing your feet on the carpet and touching someone. If you were to hold hands(bond) with someone while scuffing your feet, you will not be able to shock them. But if you generated enough of a charge the person you are bonded to would be able to pass that charge to someone else.
Friction is created by your vacuum as high volumes of air, dust, and debris travel down your plastic hose. If the two devices are connected, there is no difference of potential, they would essentially build up evenly. Basically it’s a functional static generator.
Grounding is simply an electrical drain. You can chose the path, or it will choose for you. I prefer it ensure it is going to avoid my electronics by giving an easier path to follow. Presumably, your machine is sitting on it’s plastic feet atop MDF. Wood is a poor conductor. The only cord/wire not connected to your PCB is the power cord for your router. You could go a step further and attach a string of copper between the hose and the frame.
While these steps are good, you can’t prevent the static because everything your CNC and dust collection does create it by their very nature. Bonding and grounding help to get rid of static as it builds. But, you can prevent static from building up in the first place by simply making sure that the humidity level in your work space is high enough. Dry air is mostly composed of inert gases. They act as an insulator around your machine, trapping static on the surfaces. Increasing your humidity will add water molecules to the air. That water will conduct the static and give it a perfect path to ground. 55% is the ideal level for conductivity, but it also is the minimum level to support mold growth. I have moisture issues in my basement, so my dehumidifier is set to 45% and I have no issues with static. This will also limit the free floating dust particles as the moisture will cause them to fall faster. This happens when humidity reaches above 30-40%. You will want to be sure to wipe down your track surfaces often to prevent build up of dust.