Chainguard based images, packages and libraries are first line of defense. Expensive? Yes. Foolproof? No. I think these types services will be mandatory in the near future.
One provable method to controlling or even curing depression is consistent and rigorous exercise. Society wants pills to shortcut the work required. You see it with GLP-1 as well.