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: No, a DM should make what they want without regard to the players chance of success