Over the past decades, realizing room-temperature superconductivity has become the tireless pursuit of scientists. Guided by the ‘chemical precompression’ theory, hydrogen-rich compounds have emerged as prime candidates for high-temperature superconductors, positioning them at the forefront of superconducting materials research. Extensive computational studies have identified numerous binary hydrides with predicted superconducting transition temperatures (Tc) exceeding 200 K, such as CaH6, H3S, MgH6, YH6, YH9, YH10, and LaH10 et al. Significantly, the high-Tc of H3S, LaH10, CaH6, YH6, YH9 has been experimentally confirmed. Compared to binary hydrides, ternary hydrides offer more diverse chemical compositions and structures, potentially leading to enhanced properties. Zhang et al. theoretically designed a series of AXH8-type (A = Sc, Ca, Y, Sr, La, Ba; X = Be, B, Al) ternary hydrides with “fluorite-type” backbone, which were predicted to exhibit high-Tc under moderate pressure. Among them, LaBeH8 has been experimentally confirmed to achieve a Tc of 110 K at 80 GPa. The Tcs of ternary clathrate hydrides of Li2MgH16 and Li2NaH17 have been predicted to be significantly surpassing the room temperature, while the required stabilization pressures all exceed 200 GPa. Xie et al. and Liang et al. independently predicted CaYH12 compounds with Pm-3m and Fd-3m space groups, both of which exhibit high-Tc above 200 K at about 200 GPa. Other ternary hydrides, such as La-B-H, K-B-H, La-Ce-H, and Y-Ce-H, have also been extensively investigated. At current stage, a major focus of superconducting hydrides is to achieve high-temperature superconductivity at lower pressures. In this study, taking Pm-3m (CaYH12) as a representative, we systematically investigated the effects of electron and hole doping on the dynamical stability and superconductivity in ternary hydride by first-principal calculations. The Pm-3m (CaYH12) exhibits a Tc of 218 K at 200 GPa, which is consistent with previous report. When decompressing to below 180 GPa, imaginary phonons emerge. The analysis of doping simulations demonstrated that the electron doping exacerbates the softening of the imaginary phonons, whereas hole doping eliminates the imaginary frequencies. At the pressures of 130 GPa, 100 GPa and 70 GPa, the Pm-3m (CaYH12) phase can be stabilized by hole doping at the concentration of 0.9e/cell, 0.8 e/cell, and 1.1 e/cell, respectively. Further electron-phonon coupling calculations show that the Tcs of Pm-3m (CaYH12) at 130 GPa, 100 GPa and 70 GPa are 194 K, 209 K, and 194 K at the corresponding doping level, which are only 10-20 K less than the Tc at 200 GPa. At the pressure of 70 GPa, Tc slightly decreases to 189 K at a doping level of 1.2 e/cell, primarily due to the reduced ωlog compared to the case of 1.1e/cell. And the enhanced λ at 1.2 e/cell is mainly contributed by the average electron-phonon coupling matrix element $\left\langle I^2\right\rangle$ and average phonon frequency $\left\langle\omega^2\right\rangle^{1 / 2}$, rather than the electronic density of states at the Fermi level N(εF). These results indicated that hole doping represents a promising and effective strategy for optimizing the superconductivity of Pm-3m (CaYH12) by maintaining high-Tc at low pressures. Our study has paved an avenue for realizing high-temperature superconductors at low pressure.