Energy stored in capacitor after grounding
The energy stored in a capacitor is because of potential difference, therefore it is also called potential energy. The energy stored in a capacitor is proportional to the value of capacitance. Thus, the higher-value capacitance stores more energy for the same voltage.