Plasmon losses due to electron-phonon scattering: The case of graphene encapsulated in hexagonal boron nitride