The dream, and the well
Yusuf tells his father he saw eleven stars, the sun and the moon prostrating to him (12:4). Ya'qub tells him not to repeat it to his brothers.
The brothers were already jealous. The Quran gives their reasoning in their own words: Yusuf and his brother are more beloved to our father than we, while we are a clan. Indeed, our father is in clear error (12:8). They planned to be rid of him and then be after that a righteous people (12:9) — a chillingly ordinary thought that children recognise.
One brother argued against killing him and suggested the well instead (12:10). They took him out, put him in it, and came back to their father in the evening weeping, with a shirt and a false story (12:16-18).
Egypt, the accusation and the prison
He was found by travellers, sold, and brought into an Egyptian household. Years later he was accused of something he had not done, and though the evidence pointed to his innocence, he was imprisoned anyway (12:33-35). His own words are: My Lord, prison is more to my liking than that to which they invite me.
In prison he interpreted two dreams, asked one man to mention him to his master, and was forgotten for several more years (12:42). When the king dreamed of seven fat cows and seven lean ones, Yusuf was finally remembered and brought out.
He interpreted the dream as seven years of plenty followed by seven of hardship, and gave a plan: store the grain in its ear, and save (12:47-49). He was put in charge of the storehouses.
The brothers come back
The famine brought his brothers to Egypt to ask for grain, and they did not recognise him (12:58). The Quran takes its time here, over the youngest brother, the cup, and Ya'qub at home.
Then the moment the whole surah is built towards. They finally realise who he is, and say, By Allah, certainly has Allah preferred you over us, and indeed, we have been sinners. And he answers: No blame will there be upon you today. Allah will forgive you, and He is the most merciful of the merciful (12:91-92).
He had absolute power over them, and he did not use it. He also did not pretend nothing had happened — he says today, which acknowledges that there had been blame. That is the sentence to leave a child with.