Envoyer par SMS: Stochastic control of hereditary systems and applications