Al Anine asked "What if I work hard and do well but still don't wind up with a decent faculty position?"
I can't give you any good answer--nor can anybody, which is what I am sure you are finding! There's no magic formula to success as a Ph.D. scientist. I think the best strategy is to go with everything you've got for whatever it is you want, but be ready to explore other options at all times. Learn more about 'alternative careers' (which really just means the huge range of other Ph.D.-level jobs outside of being a professor). It's funny that those are considered the "alternative," because there are a HELLUVA lot more of those jobs than there are faculty positions, and they are much more enjoyable and natural for most people in the world, as well. There are, what, like a few hundred faculty position openings a year in America? And in bad economic times, that shrinks considerably.
When I was looking for faculty jobs (and found it REALLY hard, it took me almost two years of applying), I thought a lot about 1) if I really wanted to do it, and 2) if it was worth the crazytrain I knew I would be stepping onto. I did thought experiments where I explored how happy I might be able to be in other jobs that used my Ph.D. skills, and the answer was overwhelmingly "VERY HAPPY." In the end, the exact right faculty job DID come along for me. But I wasn't waiting to bank on that: right about at the same time as I found this job and applied for it, I was also setting myself a deadline of the following spring. That if I didn't get a position in that round of a few applications I sent out, and/or if I did not get awarded my final try at the K99/R00, I was done trying to make it in academia. I would start applying for industry and other types of jobs instead.
I love writing, I love planning, I love communicating about science. I love translating complex concepts for people who need to be able to understand them (like my family who has been working so hard to understand my cousin's cancer and her treatments). There are SO many other things I could do that would let me do that. I think it's always good to just keep an open mind and be ready to maybe not keep on hanging on to that dream if the practicalities are killing its joy and severely impacting its attainability. When I let go of the stress and desperation of being so monomaniacal about that dream, I was finally able to think on a level about it that was more realistic and made it more achievable.
But just like relationships, it was all about right place-right time for each of us. I could have been perfectly happy with other job fish in the Ph.D. sea, I'm sure. Just like how breaking up with your first "true love" can be the wake up call you need to find out enough about yourself to actually WORK in a relationship, having to change your perspective on a dream can help you wake up to what you're really capable of doing and enjoying, and leave you open to other possibilities. Once I was much more comfortable in my applications (for the job and the grant), I was able to just show them who I was and see if that was what they were looking for. And it was.