ESP32 powered by supercapacitors
The energy stored in a capacitor equals:

$$U=\frac{1}{2}CV^2$$

source

In your circuit \$C=\$4 * 0.47 F = 1.88F and \$V=\$5V

That them means that \$U=\$ 1/2 * 1.88 * 5^2 = 23.5 J (Joule).

Unfortunately we cannot use all that energy as that would discharge the capacitors to 0 V (zero Volt) and that will not work, the MP2161 buck converter needs a non-zero input voltage and there is also some drop across the diode D1. I'm going to assume we can discharge to 4 V, maybe we can go lower but 4 V seems a safe assumption to me.

At 4 V the energy in the capacitors will be: \$U=\$ 1/2 * 1.88 * 4^2 = 15.04 J

So that gives us 23.5 - 15.04 = 8.46 J to work with.

If we would use that 8.46 J in 1 second that would mean our load can consume 8.46 J /second = 8.46 W (Watt). That's only theoretical, we want to discharge much slower.

Over your requested 30 seconds that would divide by 30: 8.64W / 30 = 0.282 W

That means you need to keep the current going into the MP2161 to be less than 0.282 W / 5 V = 56.4 mA. If there is not much more than just the microcontroller to power then that would be more than sufficient.

I think you can even suffice with using only one 0.47 F capacitor!