The theory of interaction between charge-density distortions (CDD) and phonons is proposed for insulating crystals with soft intra-atomic modes. A general classification of the possible types of phonon renormalisation is given for cubic crystals with NaCl and CsCl structures. A novel excitonic mechanism of CDD is offered and additional dispersion of the phonon renormalisation due to non-locality of such excitons is discussed in comparison with the standard theory of CDD. The theory is applied to the special case of rare-earth semiconductors with unstable valency. In these systems the sources of such CDD modes are the dipole excitations of the f shells and the very soft monopole excitons corresponding to valency fluctuations. The theory is compared with the experimental phonon spectra of SmS.