There is something to be said about flow in mechanical activities, because on those, yes, you are mostly not thinking, just following the "rhythm". Safety is normally one of the first things to get out of your head during that.
But programing is nothing like mechanical activities.
But the act of typing on the code and running/debugging it should be. Any toolset where you have to wait excessive amounts of time just to be able edit/ compile/launch/debug/review results is not really going to make you think more carefully about your code (an exception could be made for super long compile times, which do force you to be more careful with what you input, but I'm not really convinced it can help you write better code).
- a often very goal oriented activity (but sometimes exploratory) where I (try to in the latter case) transform a part of the system according to my visions of a better system
- the mechanics of moving the caret around (arrow keys, file selection), selecting text (shift and ctrl modifiers in addition to arrow keys), using shortcuts to invoke pre defined transformations (automated refactoring) etc.
It is the thinking I get paid the good money for.
But if I was constantly struggling with my tools then it will take more time and I would get exhausted faster.
I thankfully don't suffer from it but ask anyone with RSI about that.
My broader point however is that if even a small but non trivial part of my brain capacity must be used to deal with the mechanics.
In a way it is like when I learned to use a climbing harness for work and learned to trust it, the effect on my output when I worked in the field was amazing because everything I did was no longer interrupted by constant considerations and adjustments to stay safe.
But programing is nothing like mechanical activities.