A hysterectomy or vasectomy would only effect one's ability to conceive children. It would not change their ability to molest or abuse a child. In fact even if one was castrated they could still abuse a child with their fingers or objects.
Lastly it's important to remember that not everyone who is accused of doing something is guilty. There have been (some) documented cases where children have lied to authorities or the future ex spouse in a bitter divorce/custody battle has made accusations.
Even now it seems every year we are releasing people from prison who have been proven to be innocent of crimes with the use of DNA. Some of these folks were actually sitting on death row.
I can't imagine how big a lawsuit would be if a woman was forced to have a hysterectomy and it was later learned that she was innocent.