Just to chime in with an experience I once had with a dog around kids. I rescued a 100 pound Doberman from his life as a guard dog for a used car lot. He was about 2 years old, had never been socialized, his only reaction to humans was aggressive. My boyfriend at the time and myself took him and worked very hard with him with a trainer.
However, despite all the work we did, I still saw warning signs. He was OK around my boyfriend and I - but would become very agitated when we got too close to each other - esp. playing around. It's like he didn't know which one of us he wanted to protect. While he seemed OK (not great) around other people, whenever he saw kids he would growl and get agitated. If a kid approached our car when he was in it, he would go ballistic. One day we were at home and the doorbell rang. The dog was sitting on the couch, and the girl at the door was about 13 years old. The dog leapt off the couch and went for her face. He did leave a mark, but thankfully I think most of the damage was psychological.
I got a call from the girl's father telling me if he didn't have proof that the dog had been put down within 7 days he was going to sue and that it was not going to end well for us. We used that week to talk to trainers, vets, everyone, and everyone reached the conclusion that the dog was not stable and that he should be put down.
Now granted your situation is not as dire - this was a 100 pound dog who was trained for one thing only - to be vicious. It wasn't the dog's fault what was done to him, but unfortunately there were too many red flags to ignore and I did end up putting him down but it absolutely killed me. I was only 22 at the time. If this had happened now, I may have rethought it, but I had so many professionals telling me I was going to end up the victim of one or more massive lawsuits if the dog attacked again - and all indications were that he would have.
So my point here is to say don't feel bad. I don't see anything that you did wrong, but sometimes dogs (and people) can be wired with behavioural problems. In your case maybe these can be fixed, or maybe putting the dog in another home is an option. At least it's not a 100 pound dog that could do the kind of damage my Dobe could.
I feel for you and I just want to let you know this isn't your fault. You sound like you have done and are continuing to do all the right things.
Let us know how things are progressing.