Heatsinking is simple and effective. The temperature profile shown here shows that with the bottom of the capacitor heatsunk to a fixed temperature, the temperature rise on the top with 5W of power dissipation is no more than 1.8°C. That is a very small thermal resistance of 0.36°C/W.