The bulk of your ability to get into a school like Stanford is out of your control: either you’re the sort of scholar that is viable or you’re not. Your wishing it to be won’t do.
The people I know who were successful at getting into top schools got into them as mostly a side venture. They were already on a trajectory for greatness and their energy and drive dripped off of them – and it didn’t matter what college eventually admitted them. They didn’t care to be perfect because that was never their goal – they were hungry and that hunger drove them. They didn’t sit around as 10th graders dreaming of a school with an admit rate like Stanford or Yale or MIT – because that’s frankly foolish and illogical.
If you happen to be blessed enough by the time you’re a senior to find yourself having accomplished a ton, then YES, you can improve your chances by writing compelling essays and getting top LORs like post #6 said.
But to be frank, I never run across top school admits who “dreamt” of them as 8th 9th or 10th graders.