I should probably leave this problem and thread alone but this circuit strikes a reasonable compromise in terms of the cap discharging functionality it delivers for the cost/size (to me anyway).
The goal was
1) Guarantee an LED if >40V
2) discharge 100uF from 400V in ~2S or less and
3) have thermal protection in the case of a malfunction
This circuit uses the current regulator to guarantee 1mA for the LED from ~20V and above. The TL431 makes this precise so wattage is well controlled and by regulating current it simultaneously regulates voltage, as shown, to about 16V.
The BP_INSERTED_N signal is tied to ground when the module is inserted but floats when removed. If removed that kicks in the fast discharge leg on the right which draws an additional ~10-30mA from the 16V node which discharges the cap quickly. R30, the fast discharge resistor, is a non-linear PTC which would be thermally coupled to the DPAK current regulator as well as possible in order to shut things down if the DPAK overheated.
If everything goes well 100uF at 400V only has a few Jouls and the current regulator will only rise about 1C per J while discharging it in about 1-4 seconds. If the circuit misfires, at about 10W maximum the regulator will rise at about 10C a second giving the PTC on the order of 10 seconds to shut things down. The hardest thing to predict is the thermal time constant between the regulator and the PTC but that time scale seems reasonable to me.
The IXCP, a DPAK, is the only large package (but not too large) in the circuit and, conveniently, the only part that touches the high voltage (a plane it can sink heat too). The other parts are low cost 0402 or SOT-23.