I've learned to prepare for the worst. Most if not all accounts I've read of people after many years of sobriety falling off the wagon are about a mental shock of some kind.
I have a few coming up that are inevitable. The main ways I prepare for them are to daily practise the techniques that have proven themselves to me to work. For me that's mindfuless meditation (Anapana and Vipassana)and loving kindness meditation (Metta).
I don't know how I will cope with future shocks but I know the preparations will give me a buffer that helps me overcome without picking up.
Meanwhile, always one day at a time.