Substituting resistors with capacitors in an AC mains circuit
I ended up using the capacitors but also added 4.7k resistors in series, as suggested in the comments:

Everything seems to work fine so far. The heat issue appears to be resolved as well.