Symmetry control in reactions in molecular cavities