I'm very sorry that your children are at risk. Sadly, there is no law in any state that I know of that prohibits stupidity - people are going to do stupid things and risk their own lives, along with the lives of other innocent people by marrying, dating, or reproducing with "bad" people. There is no law against stupid.
But.........there are steps that you can take that might help your children to be safe. You have the legal option to file for sole custody of your children and ask the Court to allow only supervised visitation with their mother. Although it's often more effective to hire an attorney for such a battle, an attorney is an option in situations of custody/visitation, and many people are successful filing on their own.
If the ex's husband is a Registered Sex Offender, there are specific Laws in each state with regard to their proximity around children, including their own biological children. Don't believe everything that you see on the internet, OR FaceTube. Consult Legal Aid, your own attorney, or the County Clerk to see what your options really are.
In this age of technological information, there is a LOT of bogus information out there and it is our personal responsibility to research things like this through the most effective sources - courthouses and attorneys.
Best wishes to you and your children.