you're quite right about this.
although i would say that we do actually store memories in our bodies. this is where extended abuse and trauma really take their toll on people. think about shell shock in veterans. they train and train for combat. then they see combat and the trauma then embeds itself in the 'muscle memory' of training. then something random happens but triggers the muscle memory and the memories come flooding back.
same for say, abused wives. say they get out of their situation and meet a nice person. then one day that person gets angry that the dog shat in their best shoes and they have a fit which reminds her of her previous relationship. the memories come flooding back.
depression is the same. for me it's been a recurring failure of academic and meritorious achievements. in our society not achieving these things is like a frying pan in the face when you want to do something that requires experience say. sure, I've learned to duck, but everytime life swings a frying pan at my face [being fired, not meeting qualifications, being considered unreliable/unintelligent etc] all those old memories come back. so you end up dodging one frying pan and get hit by another, as if there were some kind of compound interest frying pan abyss. my metaphor for the muscle memory of depression. eventually you just take the hits cause what's the use in trying to dodge the pan?
i will say this though; after being on disability for a decade there is something bitter sweet about the rising levels of depression brought on by covid. while i don't wish depression on anybody whatsoever, and hope one day we'll find some perfect somatic solution to it, misery really does love company.
I'm not sure how to get the depression out of the muscle memory, but i do know we need to do a better job of getting people away from their trauma.