Can we test our mental habits like engineers test systems?

So I spend my days diving into validation engineering, where we’re always stress-testing systems and looking for failure points to make things more reliable. It got me wondering could that same mindset help with building better mental health routines? Instead of just trying to add a new habit, what if we intentionally “test” it under pressure to see where it might break? Like, if I’m trying to establish a daily mindfulness practice, maybe I’d plan a “stress test” on a particularly busy day to learn what really gets in the way. Has anyone tried applying a more structured, almost experimental approach to their personal habits? I’m curious if thinking like a validation engineer could make those habits more resilient.