One of the most remarkable things about raising children is understanding on one hand how much of an impact the home has on a child. His [or her] experience of growing up will never leave him.
The Gemara [Sukkah 53a] describes the songs that were sung at the שמחת בית השואבה by the born and bred Tzadikim and by the Baalei Teshuva:
ת״ר יש מהן אומרים אשרי ילדותנו שלא ביישה את זקנותנו אלו חסידים ואנשי מעשה ויש מהן אומרים אשרי זקנותנו שכפרה את ילדותנו אלו בעלי תשובה
The Sages taught in the Tosefta that some of them would say in their song praising God: Happy is our youth, as we did not sin then, that did not embarrass our old age. These are the pious and the men of action, who spent all their lives engaged in Torah and mitzvot. And some would say: Happy is our old age, that atoned for our youth when we sinned.
Rav Volbe pointed out: Both the צדיקים and the בעלי תשובה would refer back to their past. It was is and will ALWAYS be part and parcel of our psyche and soul. So of course history is not destiny and we choose what to do with our past - but it can't be ignored b/c it is at the root of our self knowledge.
On the other hand - regardless of how we raise our children they make their own choices. I know so many families where the children were given terrible chinuch [open, unfiltered internet, girls, an heavy emphasis on materialism etc. etc.] and the children turned out pure angels of Hashem. Other parents did EVERYTHING right and yet their children chose to go on a different path. Whether it is being not religious at all or a different [may less passionate...] approach.
Rav Aharon Lichtenstein related: On Yom Ha-atzmaut 1973, just prior to Yom Kippur War, there was a big military parade up Keren Ha-yesod Street in Jerusalem. We were new olim, having just come in 1971, and we took our children to see the parade. We went to the home of someone who lived on Keren Ha-yesod, up to their porch, and watched the parade with a number of other people. On this porch we met a Mr. Cohen from Cardiff, Wales. Cardiff is not Bnei Brak, yet all of Mr. Cohen’s children were religious and all of his grandchildren were religious. He himself was not a rav but a simple layman; many Torah giants did not merit what Mr. Cohen did. My wife and I asked him, “Mr. Cohen, how did you raise such a family?” He responded in Yiddish, “To raise children properly, you need two things: good judgment, seikhel, and divine assistance, siyata di-shemaya; and to have seikhel, you also need siyata di-shemaya.”
So we do our best to raise children to follow the Derech HaTorah but need to never stop davening for siyata di-shmaya. It is REALLY not in our hands. There are so many factors involved that are beyond us.
Here is an interesting conversation with the leader of the "Neo-Chasidic" movement, a spiritual guide to thousands, whose only son went on a different path.... [On the same site there is an interview with the well know Rav and Mechanech who talks about his dilemma of whether to attend his son's "wedding" to his "husband" השם ירחם.]
And here is the story of a boy who grew up in a typical modern home yet in a very short time reached great spiritual heights. [I am not in any way making light of his parents who are clearly much much greater people than I will ever be].