In general CPS is much more likely to believe you than the courts will be. CPS has a lot of leeway in collecting and considering evidence and they have a much lower standard of proof than the courts do.
In court you will have to prove beyond a reasonable doubt that what you are saying is true. In court your ex-husband will have all his rights protected, he can bring his own evidence, he can cross-examine you, he can raise doubts about your motives.
You should talk to a lawyer, but if you weren't successful with CPS, then you most likely will not be successful in court.
Divorce is always difficult.
If you can find a way to negotiate with your husband it may be the way to find out what is best for your children. You can negotiate visitation terms and get assurances from him about keeping the children safe.