DIY electromagnetic shielding (CNC mill)
the CNC shield and the motor do not share a common ground,

This is one of your problems. A common ground and shield wires for all power and signals is necessary to minimize EMI. A small RF cap help on endStop switches only if you get false signals with NO switches wired correctly.
But avoid multiple SMPS if you can help it as users seem to not know why they have interference. I.e. use a laptop on battery with 1 supply for all CNC for starters.
Reading Henry Ott’s latest book or an older version in Archive.org will take you a few months to learn or longer but well worth it.
I would say shorter if your search skills found my answers here on this site.