The increase of electric demand and the progressive integration of renewable sources threatens the stability of the power grid. To solve this issue, several methods have been proposed to control the demand side instead of increasing the spinning reserve in the supply side. Here we focus on dynamic demand control (DDC), a method in which smart devices can autonomously delay its scheduled operation if the electric frequency is outside a suitable range. We have recently shown that DDC effectively reduces small and medium size frequency fluctuations but, due to the need of recovering pending tasks, the probability of large demand peaks, and hence large frequency fluctuations, may actually increase. Although these events are very rare they can potentially trigger a failure of the system and therefore strategies to avoid them have to be addressed. In this work we introduce a method including communication among DDC devices belonging to a given group, such that they can coordinate opposite actions to keep the group demand more stable. We show that for method reduces the amount of pending tasks by a factor 10 while large frequency fluctuations are significantly reduced or even completely avoided.