I don't think it is the resistor itself . It has some form of glue on the bottom, and that discolored possibly due to heat from the resistor itself. The resistor does not look overheated. Any sparking could be a cold solder joint at that resistor (and producing excess heat on the glue). One would have to look at the traces on the bottom of the board.
Common failure is a bad relay, "burned out" so to speak. The rest of the control board seems to be ok, no obvious burned out components. The yellow caps seem to be more along the line of AC filter caps or noise suppressors than anything else. The yellow cap nearest the "COMP" power pin is too low to be a motor start capacitor (0.068uF). It is probably to suppress voltage spikes from the relay.
I once took apart a dehumidifier, and the compressor did not have any external motor start capacitor.
What is the "black plug"? It could be a motor start contactor. The big bump in the upper right could have an embedded motor capacitor, though it seems a bit small to me. Those motor start contactor/relay can "die" as well.
Thus. my primary suspicion is the "black plug", followed second by the relay on the board as the most likely points of failure. That all said, if there is open sparking around that resistor, a cold solder joint could prevent AC power from properly getting to the rest of the circuit. Find out what is sparking first, pinpoint it.