It's easy to do the maths:
V (voltage) = I (current) × R (resistance)
P (power dissipated) = I² (current) × R (resistance)
In the case of a 52v battery voltage and 20 ohm resistor:
52v = I × 20Ω
I = 2.6A
P = 2.6² × 20Ω
P = 135.2W
On this basis, the 0.5W resistor you've provided a picture of wouldn't stand a chance.
But the situation isn't that bad:
- The resistor doesn't need to provide continuous power, just for a few seconds.
- The capacitor's voltage will quickly rise from 0v, so the above calculations only apply for the first tiny moment of surge.
Because of this, a cheap 20W ceramic resistor would work just fine.