The SF Chronicle has done some fantastic reporting on schools and has a whole section on data and insights to college that includes the path to college (e.g., high school).
With a 5th grader, my view would be towards ensuring that you are at a school that feeds into the best middle school for HS. In SF, Lowell is definitely your goal, although the acceptance rates to UC are better at Mission. Mission has the best Berkeley admission rates in the entire state. But Lowell sends a larger total number of students. (Lowell usually sends the most, or close to the most, in the state for Berkeley and UCLA.)
The other thing to consider if you are living in SF, is that your "attendance area" largely determines what elementary and middle schools you get in the "lottery." (Lowell is more of a true lottery and it won't matter where you live.) So, choose your housing carefully.
We ended up being very, very happy with our AA elementary school because it was a small school with a tight, inclusive community that was very supportive of academic achievement and kids with a variety of interest.
Unfortunately, we had to move to a different city for work and the kids now attend a school that is in a "better" suburban district but that is substantially worse for our kids (in particular). They've suffered socially (because they aren't into sports) and academically (because they are ignored as B+/A- students). I say this only to point out the hard lesson we learned, which is that whatever people tell you about what makes a good school, in my experience the thing to do is to really take the time to evaluate what your kid needs and then find the school and community that best aligns with that.
https://www.sfchronicle.com/projects/california-college-admissions/