Context. The long-term evolution of an atmosphere and the remote detectability of its chemical constituents are susceptible to how the atmospheric gas responds to stellar irradiation. The response remains poorly characterized for water and its dissociation products, however, this knowledge is relevant to our understanding of hypothetical water-rich exoplanets. Aims. Our work investigates the effect of photoelectrons, namely, the non-thermal electrons produced by photoionizing stellar radiation on the heating and ionization of extended atmospheres dominated by the dissociation products of water. Methods. We used a Monte Carlo model and up-to-date collision cross sections to simulate the slowing down of photoelectrons in O-H mixtures for a range of fractional ionizations and photoelectron energies. Results. We find that that the fraction of energy of a photoelectron that goes into heating is similar in a pure H gas and in O–H mixtures, except for very low fractional ionizations, whereby the O atom remains an efficient sink of energy. The O–H mixtures will go on to produce more electrons because the O atom is particularly susceptible to ionization. We quantified all that information and present it in a way that can be easily incorporated into photochemical-hydrodynamical models. Conclusions. Neglecting the role of photoelectrons in models of water-rich atmospheres will result in overestimations of the atmospheric heating and, foreseeably, the mass-loss rates as well. It will also underestimate the rate at which the atmospheric gas becomes ionized, which may have implications for the detection of extended atmospheres with Lyman-α transmission spectroscopy. Our simulations for the small exoplanets π Men c and TRAPPIST-1 b reveal that they respond very differently to irradiation from their host stars, with water remaining in molecular form at lower pressures in the latter case.