Well... I tried to switch them as you asked, lm35 circuit on the other side next to the arduino 5v rail, transistor on the side of the 12V rail. However, I dont have any 0.1microfarad capacitors at the moment, only two 1microfarad, and a dozen 100microfarad ones (ceramic and electrolytic).
This is how the circuit looks like rn :


