Wikipedia:
"A person may be ferendae sententiae (i.e., upon judicial review) excommunicated if he:
...
4. who breaks a penal law allowing excommunication that was enacted on local level, which the local authority, however, may only do with great caution and for grave offences (for Latin Catholics, can. 1318 CIC)."
I would expect molesting children to be grave enough.