Cool. How do you ensure the D9 output isn’t PWMing? Is M106 enough, or do you need to specify “M106 S255”?
For the flaky electronics, you could try adding filters to your power supply — ideally monitor the 12V line with a scope and then select capacitors to filter out the frequencies you are seeing. Or just take a guess; put at least one nice big electrolytic cap across your 12V/ground rails in case you are getting brownouts.