Early warning indicators via latent stochastic dynamical systems