Seems alot of drama for something so small
Recordings are not permissable in Courts, end of. As another answerer put it, if there is barring/safety/protection orders in situ, your placing yourself in a very slippy slope by being at your ex partners abode. In effect, if you are that afraid of your ex husband, why be in the same room as him. "the fear of threat/violence".....not the act itself, so if you were in a room full of people, you would still feel fear? would you not?
If they were that concerned about your treatment of the children, they would contact the HSE and proceed with the relevant sections (think its S20/S21), and correctly assess the children, not through a dictaphone, by recording them saying "mammy's mean to me", good god, my son would tell you I shout and him all the time and 'kill' him from time to time....kids words are not adult actions. Let them record you, if you have nothing to hide, and just keep yourself away from situations like that, the in laws, out laws, ex partner......that generally solves any possible disputes.