No matter what you do, you aren't going to parent your children perfectly. And even if you could be the perfect parent, there are too many other things that happen to people in their first 18 years that hurt them. No one comes out of childhood unscathed.
Everyone could go to therapy. A lot of us roll along, functioning decently. But we'd probably all be better off if we spent six months seeing a good therapist who could help us identify and come to terms with the stuff that happened when we were kids, and then help us make a plan to act in ways that lead us to connection and fulfillment instead of re-enacting old hurts and patterns.
This is just life. No matter how many things you do correctly. No matter how many good decisions you make. No matter how attentive or correct or research-backed or selfless or good-enough you are, your kids are of this world, so they're going to be hurt somehow at some point.
You can feel despair about it, or you can realize that this releases you from having to be perfect and instead allows you to be better. Knowing that SOMETHING is going to hurt your kids, you get to minimize the big things that are in your control. You get to pick what you protect them from and what you let them experience. What they learn to handle early and what you scaffold them in for longer. Being mindful of their individual personalities, and of your own resources.
And you know that there are some things that you can't control. All you can do is be there to help your kids through them, so they don't have to process alone.
And then, when your kids are adults, and they start working through the stuff that happened when they were kids, stay close. You know you did the best you could, so you don't have to justify yourself. Listen with open ears and an open heart. Be willing to analyze and debrief when your kids need to. Apologize if things got past you that hurt them. Know that as your kids come to terms with things you can stay close if you stay open.
Life is hard. But we have each other.