I designed GSM modem powered for years from lithium cell. It required particular gymnastics around power management: how not to overload battery, still provide 2 A peak current when modem is transmitting, how to put it too sleep, how to wake it up and so
good times.
Been there, done that. You can't compare GSM modules with a wifi module. A GSM module (2G) requires up to 2.8 A peak for 8.1 ms.
Adding large capacitors:
in your case when using certain non rechargeable lithium type batteries that's a normal solution. The capacitor ESR is in those cases much lower than the battery resistance such that under transient conditions, the capacitors supplies the bulk of the current. During the off time, the remaining slots, the batteries can charge the capacitors again. Tadiran and some others supply small lithium capacitors for such applications.
Back to the WIfi module:Wifi modules require only 300 mA for 2 ms.
Why capacitor are bad idea? This application is not about dealing with high frequency ripple where a small bit of stray inductance in series with the supply takes care of making sure the capacitor will supply the bulk of the required current.
Capacitor on the 5 V bus: the source resistance of the power port is unknown. As such, if you place a capacitor in parallel, the current will split between the source and the capacitor in an unknown ratio.
Capacitor on the 3.3 V bus: same problem. During a TX burst, the current will be divided between the buck regulator and the added capacitor. But unless the capacitor has a very low ESR, the bulk of the current during a transient will be supplied by the buck regulator in again an unknown/unpredictable ratio.
Anyhow, here is recipe for a filter. This filter provides at least 30 dB attenuation at the switching frequency of the regulator and maintains a low output impedance. The ripple voltage at the buck regulator should be about 30...60 mV with a 4.7 µF capacitor. (depends on the buck reg. inductor value which is not known. I assumed 1 µH a shown in the data sheet)
-The 22 µF capacitors with a resistor in series are the LC circuit damping networks. Instead of resistors in series with the capacitors, you can use regular electrolytic capacitors with an ESR between 0.5 and 1 R.
-The output capacitor must be placed as close as possible to the buck regulator and must have a capacitance of at least 4.7 µF at 5 V. This smallest MLCC capacitor able to achieve this has at least size 1210.
-The zener at the input: required because the power port output capacitor value and ESR are unknown and a correct damping network can't be provided. The zener diode clamps the overshoot when you plug this into the power port.
Of course the filter introduces a small ripple voltage at the input of the buck regulator. If the ripple of 30...60 mV at the input of the buck regulator is a problem, you can increase the 4.7 µF capacitor towards 10 µF.
The filter size can be reduced if you need less attenuation.