I'm running a 39 X 17 these days (freewheel), which, at somewhere around 60 gear inches, is pretty spinny. I love it on climbs, but I get spit out the back on flat sections. In your case, I think the 40 X 17 would definitely be noticeable, and it would achieve what you're aiming for, in terms of climbing comfort and knee health.
But putting a freewheel on both sides of a flip/flop hub would give you the option of switching back and forth. 42 X 18 (61.2 gear inches) is essentially the same as 40 X 17 (61.8 g.i.). Run a 17T on one side and an 18T on the other, and the chain should still fit fine.