is there a role to play for homework
in pushing through the hard part
Yep, you got it exactly right.A N Whitehead has said it better than I can, so let's quote him: "Many think we should cultivate the habit of thinking of what we are doing. The precise opposite is the case. Civilization advances by extending the number of important operations which we can perform without thinking about them."
Homework helps with repetition even for extrinsically motivated students, which leads to the ability to perform without thinking, which is the basis of mastery and enjoyment.