The compressor will draw 10x it’s rated current on startup, so your supply may be over stressed.,If not add a 10% rating dummy load such as a bulb then it will be more stable.
But the duration will be much less than a single 50,60Hz cycle if rated for 400A single surge current on a 15A diode.
So Answer=No problem
Your problem is lack of specs on power of source and load with a 10x surge with possible radiated or conducted EMI transients interfering with stability getting back into feedback loop. the filter may help for conducted filtering but not radiated if your cable acts as an antenna and couples into the regulator with dI/dt air gap arc noise.
The thermal resistance can be 2’C/W to the leads and 12’C/W to the case.
So if the back EMF on turn off drives the supply the diodes will clamp the over voltage spike safely. If you wanted to test the diode temp. and feel it is getting too hot to touch, you may clamp the body to the chassis with a copper strap shaped in a U around the body and screwed to the chassis with heat shrink on the leads for accidental short protection.
Adding a remote plastic Cap across the ,tor will reduce the RF bit if the 12 V load referred back to the 5V regulator is unstable with a step response the best treatment is the dummy preload for unknown PSU’s. the key point is the surge current on start and BEMF on stop.
All PC PSU’s regulate on 5V AMD the others track by transformer ratios and very tight (high mutual coupling. This means you can also preload the 5V instead, but may be easier for you on the 5V supply as these tend to be higher power rating and the 12V is for or less steady GPU’s loads
If you can list the power ratings of compressor and supply, that would clear up your problem with photo layouts. Hopefully you are using twisted pairs to the motor!
Update with new info
10mF will help for a few milliseconds and appear as a short until charged up. No good. the motor May appear like 0.12mOhm rising to 1.2mOhms running on 12V you can measure the start R with a good ohm meter.
This is an automotive style compressor . It may start with 50~ 100A and decline until full RPM. Which could be a 1 kW so it is design for car batteries not PC PSU’s !! Good luck ,
but I think you will need a separate regulator for your Analog/ Logic from 12V down , the 5 V will also be unstable.
The steady state noise is a shielding problem that demands single or double shielded heavy wire, not common with a large CM filter or easier , shield and isolate the offended system with cables at right angles.far apart.
Still need more details on system, layout and problems.