Since worms usually survive electric shocks (and people usually survive seizures), the connectome is probably enough; there probably isn't anything vital in volatile memory. Less-volatile memory like DNA methylation has been proposed to be a significant memory mechanism at the per-cell level but so far, as I understand it, there is not good evidence for this.
https://www.embopress.org/doi/full/10.1002/embj.201387637 seems to be an overview of the situation from a few years ago.