Let me deal with your last observation/question first. Jamie Jensen's routes in his book, Road Trip USA, follow specific highways from one end to the other. Certainly, they go through some interesting areas, any highway that's long enough will. But their defining 'thing' is following a number, in the case of the Pacific Coast route, US-101. To be fair, on this particular route, he follows CA-1 between San Francisco and Santa Barbara. But what he doesn;t show you is anything even 10 miles from the road. You can drive US-101/CA-1 all the way down the coast, but it will be slow going and will bypass Mt. Shasta, Sacramento, and Yosemite on the drive south. I'd strongly recommend that you stick with your original plan rather than just follow a highway number.
As to how far out from a given park you'll have to stay to get a decent rate, that depends on a trade-off between your definition of 'far' and your definition of 'decent rate'. So in the end, this is a decision only you can make. I will say that it has been my experience that if I'm willing to drive an hour to get to the park and an hour to get 'home' in the evening, the rates are very reasonable. And I don't consider a couple of hours spent getting to/from a day long experience of a lifetime a heavy penalty. As a rule you'll find your best deals in moderately sized towns where motels don't have to rely on seasonal business and where there is some competition. Unfortunately, Yosemite is far enough into the 'wilderness' that something will have to give. I don't think you'd find really good rates until you got out along CA-49 in Mariposa and/or Moccasin, and even there they won't be cheap especially in high season. To be honest, I looked at some rates and I think I'd be inclined to settle in Moccasin at the most modest motel I could stand, but book one night in the park itself. That way I could spend two nearly full days in the park, and one unforgettable night, while saving a significant chunk on the other nights.
AZBuck