Charge-transfer chemical reactions in nanofluidic Fabry-Pérot cavities