So your MIL agreed (probably reluctantly, but trying to keep you happy) to crate her dog.
Then after your children had been there for 'several hours', the dog started moaning and getting agitated.
Circumstances changed, and your MIL made a judgement call about her own pet, in her own home, and let the dog out. I think this is normal.
I understand that the recent dog attacks have been horrific, but the attitude towards dogs on mumsnet is bonkers. We all grew up around dogs: ours, the grandparents', the neighbours', all wandering around together. I can think of exactly zero children I knew ever being attacked by a dog. (Not saying it never happened, it must've to somebody, but my point is that it was exceedingly rare.)
I think there is going to be a whole new generation of children who have no idea how to behave around dogs. My friend is scared of dogs, and teaches her children to be the same. Last time she brought the children (aged 6 and 9) to my house, I caught them banging on the glass door to stir up the dog, throwing orange peel at the dog's head, screaming at the dog, and so on. This was despite the fact that I'd told them calmly, several times, to please ignore the dog and she would ignore them (true).
Anyway, OP - if you are that worried about dogs, you need to not leave your children with dog owners. It is completely unreasonable to expect your MIL to leave an animal caged and distressed, once it got that way.