When is a uC power supply "smooth enough" e.g. when some noisy (inductive, switch) load is around?
If the MCU has an ADC to measure some sensors, then you should assume the ADC ability to reject VDD trash is zero.

That is, during most-significan-bit decisions, a 100 millivolt spike into your +5 regulator will probably produce 100mV output, because LDOs just cannot work fast enough to prevent input spikes from becoming output spikes. And your ADC likely will make a 100 millivolt error in quantizing the sensor voltage. Is that OK?

Your question then becomes: how much upsetting of measurements will I tolerate? and you
can use L+C filtering between the +12v and the +5 regulator.

100 uH in the +12v line to regulator, with 100uF shunting input to regulator to GND, with 1 ohm resistor in SERIES with 100 uH, might work.

================================ edit

[ I'd previously had the 1 ohm Rdampen in parallel with inductor, to avoid consuming DC headroom; but with 12-5 = 7 volts headroom, lets have the resistor be in series, for even better 2-pole attenuation.