Obviously there are some encounters that players should know full and well they cannot win at so this question goes more to DM theory. Is it he Dms responsibility to make balanced encounters or should the DM just do what they want and that may often mean insurmountable challenges?
Your vote: Yes, a DM should focus more on players accomplishing goals and that means everything is winnable