As others have said, the main reason Anakin joined the dark side was his inability to accept that everything is short-lived. Death and loss are part of life but Anakin didn't want to realize that. He wanted to find a way to avoid experiencing loss, seek power that could prevent him from having to endure loss. And since that's not exactly what the light side offers (everybody dies at one point and rejoins the Force) he thought it's the dark side that could offer it to him.
So, yeah, what Anakin needed to learn was to let go of his fear of loss, to accept that everything is fleeting which in turn would have made it easier for him to accept eventual loss. As you said, maybe Qui-Gon would have been able to teach him that properly (although Anakin actually learnt about this particular lesson from the Jedi, anyway, one way or the other). However, I think the choice of teacher is less problematic than the age of being taught. Anakin was already attached to somebody at the time he was brought to the Jedi Order. I think what could've helped prevent him from falling to the dark side, what could've helped him learning to implement the teaching about letting go of attachments is being brought to the Jedi as a toddler. So he would've grown up implementing this teaching in his life without being distracted by already existing attachments (that would've at least decreased the chance of him being incapable of letting go of attachments and falling to the dark side, I daresay).
^Regarding the Rako Hardeen-affair: On one hand, it's understandable that Anakin was hurt by that apparent lack of trust. It's a natural reaction. On the other hand, Anakin wasn't the only person close to Obi-Wan they didn't tell about the latter faking his death. Ahsoka, Cody, and Satine weren't in on the secret, either. So, although that course of action was indeed not really considerate, I don't think they focussed on withholding that secret specifically from Anakin. I think both sides had reasons for their actions/reactions but you are right that this affair made it easier for Palpatine to convince Anakin that the Jedi didn't care about him