  The dynamics of cold trapped ions in a high-finesse resonator results from
the interplay between the long-range Coulomb repulsion and the cavity-induced
interactions. The latter are due to multiple scatterings of laser photons
inside the cavity and become relevant when the laser pump is sufficiently
strong to overcome photon decay. We study the stationary states of ions coupled
with a mode of a standing-wave cavity as a function of the cavity and laser
parameters, when the typical length scales of the two self-organizing
processes, Coulomb crystallization and photon-mediated interactions, are
incommensurate. The dynamics are frustrated and in specific limiting cases can
be cast in terms of the Frenkel-Kontorova model, which reproduces features of
friction in one dimension. We numerically recover the sliding and pinned
phases. For strong cavity nonlinearities, they are in general separated by
bistable regions where superlubric and stick-slip dynamics coexist. The cavity,
moreover, acts as a thermal reservoir and can cool the chain vibrations to
temperatures controlled by the cavity parameters and by the ions phase. These
features are imprinted in the radiation emitted by the cavity, which is readily
measurable in state-of-art setups of cavity quantum electrodynamics.
