The most sage advice I've received from a practical parent with 4 kids was,
"Parenting is a learning process over time, and that no matter how much you try you can still "Kobiashi Maru" yourself."
That is to say, you can do everything right and still fail or feel like you failed.
Children deserve your best effort. Especially during times of failures. That's when it counts the most because it's not what we do when they're always right, it's how we help them when they're wrong.
To learn that life is about attempting, doing, taking the chance, falling down, getting back up.