Some say "намылить" is to "put some frothy soap on", "to lather" and actually this phrase has pretty grim etymology - for execution via hanging the know was usually lubricated by soap (or wax) to ensure it smoothness. Sometimes neck of one who's executed was lathered as well.
So "намылить шею" (according to this version) initially had more dark connotations that not just non-existent - it's quite soft actually.
This is at least the most popular version.
However personally me never found this version convincing enough - it's just that there's not enough evidence that support this version.
намылить meant to stand for: "намыливая в воде, растирать, натирать":
If you've ever seen how laundry looks like before the invention of washing machines you've most likely seen something like this:
This device is called washboard (or
стиральная доска in Russian) and Wikipedia got it right:
Clothes are soaked in hot soapy water in a washtub or sink, then squeezed and rubbed against the ridged surface of the washboard to force the cleansing fluid through the cloth to carry away dirt.
So, it's rubbing forcibly against some ridged hard surface. One can imagine that it's quite uncomfortable if we'll make the same with the neck.
So may be etymology is not that grim after all.