It wouldn't work. Homework is there so that you learn the material well before the exams instead of cramming. If it doesn't count towards the final grade, people won't do it.
I had a professor who said that having frequent (like twice-weekly) quizzes, which has the some purpose as assigning homework, had reduced the number of failures in the class considerably.
But with this system, the "safe" option is still to do all the homework assignments. If you're implying that making them option "punishes" the "bad" students (by bad I simply mean more likely to fail), then by that logic requiring the homework punishes the "good" students.
I had a professor who said that having frequent (like twice-weekly) quizzes, which has the some purpose as assigning homework, had reduced the number of failures in the class considerably.