By means of Cu K edge X-ray absorption spectra of overdoped superconducting YSr2Cu2.75Mo0.25O7.54 and Sr2CuO3.3 doped with high-pressure oxygen, we demonstrate a remarkably strong three way correlation between the superconductivity and the local dynamics of their highly anharmonic Cu-Sr and Cu-apical O pairs. We model the latter as aspects of the Internal Quantum Tunneling Polarons (IQTPs) that give the two-site distributions in extended X-ray absorption fine structure (EXAFS) and inelastic pair distribution function measurements. This finding obviates the common assumption that the universal Ba/Sr-apical O dielectric layer, far from only maintaining the separation of charges between the charge reservoir and the CuO2 conducting domains, plays an unexpectedly active role in the unusual electronic properties of cuprate superconductors. Furthermore, we investigate the effects of the dynamic structure associated with these pairs by means of the exact diagonalization of a prototype Hamiltonian based on a six-atom cluster, with two neighboring Cu-apical O pairs bridged by an anharmonically coupled Sr atom and a planar O atom. In terms of the Kuramoto model for synchronization, these calculations show a first order phase transition, driven by anharmonicity, to a synchronized state of the IQTPs, in which a fraction of the charge originally confined to the apical O sites is transferred onto the planar O in the superconducting plane. This combination of experimental results and theory demonstrates that the Ba/Sr-apical O layer of cuprates most likely plays an important role in high temperature superconductivity via its collective charge dynamics.