If the capacitors behaved ideally, you would be correct. However the capacitors don't behave ideally and lower value capacitors have lower impedance at higher frequencies in general (but, of course, because of the low capacitance, they don't have low impedance at low frequencies).
Just to give you an idea of what an accurate (but simplified because it's linear) model of a 22uF capacitor looks like, here is the Murata SPICE model of a 22uF/6.3V capacitor at 20°C and 5V bias.
![enter image description here](https://cdn.statically.io/img/i.sstatic.net/pLCbP.png)
At that one temperature and voltage it is simulated by 30 lumped components (redrawing that into a more readable schematic is left as an exercise, you would just connect all like node numbers together).
The net result looks like this:
![enter image description here](https://cdn.statically.io/img/i.sstatic.net/BS8Tl.png)
And (not simulated in the linear SPICE model) the capacitance vs. voltage curve looks like this:
![enter image description here](https://cdn.statically.io/img/i.sstatic.net/PIabq.png)
As you can see the capacitor has increasing impedance above some hundreds of kHz. In some cases this single capacitor may be sufficient since it doesn't get above 1\$\Omega\$ until 500MHz or so, but for a high speed logic circuit you will probably want to parallel it with at least one lower value capacitor.
Note also that the 22uF ends up being around 7uF (basically C1 in the SPICE model) at 5V bias. This linear SPICE model is accurate only for small voltage excursions around the 5V bias level. Temperature changes from 20°C will also have a significant effect on the bulk capacitance (about +/-10% in a nonlinear fashion over the temperature range).
(Images generated from Murata's online tools and LTspice).
The low value parts are most effective very close to the supply pin and ground in question. It's not unusual to have a single high value capacitor and multiples of the lower values (either single or in pairs etc.) distributed around physically so the are very close (mm) to various supply pins that are fed from a single rail.