We report a sudden reversal in the pressure dependence of Tc in the iron-based superconductor CsFe2As2, similar to that discovered recently in KFe2As2 [Tafti et al., Nat. Phys. 9, 349 (2013)]. As in KFe2As2, we observe no change in the Hall coefficient at the zero temperature limit, again ruling out a Lifshitz transition across the critical pressure Pc. We interpret the Tc reversal in the two materials as a phase transition from one pairing state to another, tuned by pressure, and investigate what parameters control this transition. Comparing samples of different residual resistivity, we find that a 6-fold increase in impurity scattering does not shift Pc. From a study of X-ray diffraction on KFe2As2 under pressure, we report the pressure dependence of lattice constants and As-Fe-As bond angle. The pressure dependence of these lattice parameters suggests that Pc should be significantly higher in CsFe2As2 than in KFe2As2, but we find on the contrary that Pc is lower in CsFe2As2. Resistivity measurements under pressure reveal a change of regime across Pc, suggesting a possible link between inelastic scattering and pairing symmetry.