A Surge Protection Device (SPD) should be installed after the power supply. A surge protector is a device to give any voltage surge in a power source a safe path to ground. As can be seen in the following photograph, a surge protector is always installed in most industrial control panels.
A noise filter is a device that effectlively removes noise from a power source.
Be sure to select the correct size of Switch Mode Power Supply (SMPS). Usually 2 ~ 3 times larger is recommended.
If your system is unstable now, consider adding a SPD, noise filter, and/or larger SMPS.