I read on HN that flow is achieved when work is only upto a certain level of difficulty for you. Flow is achieved because you can create comfortably and still feel like working through a challenge. If it's easier it doesn't feel like a challenge anymore, more difficult and it puts you out of the zone.
Yes, this is the theme of the work by Mihaly Csikszentmihalyi. I have even thought it somewhat similar to the state of mind that Cal Newport tries to promote in his book "Deep Work".
I'm not sure that is universal. I can lose myself in mechanical rote work, or lose myself in technical research, flow doesn't necessarily stop on a switch of focus if the end goal remains in sight.