You don't say which side on Death Valley Nat'l Park you'd be coming out of. But if it's the east side (Hiway 127) I highly recommend heading thru the Mojave Nat'l Preserve to Kelso, then down thru Amboy, and on to 29 Palm and into Joshua Tree Nat'l Park. We've traveled from Las Vegas to Palms Desert many times pulling our travel trailers thru that interesting countryside with no problems & and the two lane roads are fine. Kelso is also a Nat'l Park site : A major trail depot and stop during WWII.
Also, you'd have no problem pulling a trailer thru Joshua Tree, out the south entrance then on "Box Canyon" road to Mecca, cutting off part of I-10 on your way to Anza Borrego.
On your way from Anza Borrego to Yosemite - assuming you're entering Yosemite from the west side, I'd recommend: State 86 to I-10 to I-215 to I-15 to State 138 to 14 to 58 and on to Bakersfield then to Yosemite. That way you'll avoid a lot of the LA "insanity".
One caveat... I much prefer driving on the two lane roads as I feel I see so much more of the country... Which is why I own a trailer anyway!
2018 Escape 19'er & 2018 Highlander
Not all who wander are lost