SF to Vegas via yosemite and Death Valley

Hi!
Myself and my boyf are heading stateside for the month of July. We've a pretty packed itinerary but really want to do the route from SF to Vegas via Yosemite and Death Valley.
This trip must be the most discussed route of this forum but after lots of searching I still have some questions!! We're on a bit of a time limit so we're hoping to traval from SF on 17th and spend 3 nights in Yosemite. We're leaving Yosemite on 20th and heading to Death Valley via tioga pass. From what I've seen I reckon we need to do a stop over in somewhere like lone pine or lee vining then head to DV. One night in DV then arriving in Vegas for 22nd of July.

Now, does this sound doable? Is it utter madness to drive through DV in late July. If you think it is (madness) can you suggest another way to get to Vegas as quickly?

We only have one shot at this and we really really want to get this right!! We're so excited its a trip of a life time.

You've got plenty of time for this trip, and you should be just fine. If you needed to, you could drive from Yosemite all the way to Vegas in one day via Tioga Pass - you'd just be fairly rushed and really wouldn't have much any time for Death Valley.

Death Valley will be very hot, and you certainly should bring lots of water with you, and make sure you are drinking it if you leave your car to do a little exploring. But you certainly can stop there and I think you'll have a good time.

From what I've seen I reckon we need to do a stop over in somewhere like lone pine or lee vining then head to DV. One night in DV then arriving in Vegas for 22nd of July.

This is certainly an option and easily done, but as you have a nice amount of time to enjoy Yosemite, you could comfortably make it over Tioga to Lone Pine, that is close to DV, or Panamint springs or Stovepipe wells in the park, and make it to Vegas next day if time is an issue. Of course, if you have the time, 2 nights will allow you to explore a little more and be relaxed, but 1 night would be doable. If you choose 2 nights you might be best off staying around the Lee vining/Bishop area and spend a little time at Mono lake.

I would certainly drive through Death valley, the landscape is awesome and there are some short walks from the car available, but as well as water, carry some sunscreen, hats and snacks in the car.