  We report inelastic x-ray scattering measurements of the in-plane polarized
transverse acoustic phonon mode propagating along $q\parallel$[100] in various
hole-doped compounds belonging to the 122 family of iron-based superconductors.
The slope of the dispersion of this phonon mode is proportional to the square
root of the shear modulus $C_{66}$ in the $q \rightarrow 0$ limit and, hence,
sensitive to the tetragonal-to-orthorhombic structural phase transition
occurring in these compounds. In contrast to a recent report for
Ba(Fe$_{0.94}$Co$_{0.06}$)$_2$As$_2$ [F. Weber et al., Phys. Rev. B 98, 014516
(2018)], we find qualitative agreement between values of $C_{66}$ deduced from
our experiments and those derived from measurements of the Youngs modulus in
Ba$_{1-x}$(K,Na)$_x$Fe$_2$As$_2$ at optimal doping. These results provide an
upper limit of about 50 {\AA} for the nematic correlation length for the
optimally hole-doped compounds. Furthermore, we also studied compounds at lower
doping levels exhibiting the orthorhombic magnetic phase, where $C_{66}$ is not
accessible by volume probes, as well as the C4 tetragonal magnetic
phase.investigated
