I hope the following doesn't come across harsh. It's not meant to. I'm just a firm believer in a couple of issues with dogs.
Dogs & babies/small children should NEVER be left alone together. This is true for your current dog or any future dog. In addition, crawling babies & dogs who are eating are even bigger issues. Babies & small children should never be allowed to approach an eating dog or crawl up to a sleeping dog. The potential for an issue is there with any dog, no matter what.
If you are really concerned, I would consult a trainer for an in-person assessment.
I would not get rid of your dog based on that one incident, which was preventable & predictable. Some dogs should never be around children, but what you described doesn't necessarily mean yours is in the category. This is where a trainer could be of more help than we can, as he or she can get all the details, assess the dog, etc.
You may find yourself amazed at how your dog adjusts to children. We had 2 older, large dogs with ds #1 was born. Our no-nonsense female ended up being the most tolerant dog in the world. It was astonishing, as she had not been raised with children. Our male was a neurotic mess & he whined for the 1st 3 months. Then he magically adjusted. He had always been neurotic, but we never had an issue with him & the baby. When our son was just over a year, our female died & his neuroses disappeared. He is now blind, going deaf, & very old, but he is unfazed in the face of 2 rambunctious boys running around & screaming. I would never have believed it, but he's been amazing. Even though they were both great, we never let the kids - and still don't - crawl up to the dogs when they are lying down, particularly if they are sleeping or cornered. It's just one of those things that should always be a no-no.
Our older son did crawl all over our female & she was so patient, but those were times where we were all together, & she was in the middle of the livingroom & fully aware of him. She would just get up & leave when she was done.
The smallest things can make that difference, though, & we didn't let him approach her when she was asleep or in a corner somewhere. And honestly, the kids are 4.5 & 2 now & they've been great with the dog(s). It really hasn't been hard to keep all of them safe. With company, I used to put the dogs in a bedroom & I would for him now, too, if we had small kids over. It's not fair to him or to them to risk anything.