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 try to make encounters as balanced as possible so the group always has a chance of success, even if sometimes it is difficult