About halfway between Kassel and Tubingen is Darmstadt. Just outside of Darmstadt is the Messel Fossil Pit and museum, which may be interesting to a 6 year old boy. It's pretty good. But...
If you're going to Stuttgart the State Museum of Natural History Stuttgart is really fantastic with a huge selection of dinosaurs and fossils, and special tours for kids. I've been in some of the worlds best Dino museums, and this place is that good. You could easily do this in the same day as the Porsche museum, or with a visit to the Zoo, which is also really well done. The Porsche museum does have stuff for kids, even us older ones. (Don't mix up the natural history museums in Stuttgart, the one I've linked to is the one with dinos, the other one is more recent biology.)
An alternative, because it's not on everyone's list, would be to go to Speyer and spend a day or two. As good as Stuttgart is for car lovers, the Technical Museum in Speyer is even better for kids who might be interested. Because they have airplanes you can climb in, a submarine you can go through, mechanical stuff you can turn on (like huge music machines or trains), and hundreds of cars, planes, and just about everything else mechanical. Plus the museum there has a huge display of toys, the cathedral has the largest number of Holy Roman Emperor tombs, and the town is really easy to walk around. And for parents, it's got really good beer gardens on the river and sits in the middle of the wine region. And they have an aquarium.
https://www.messelmuseum.de/en/home-english/
https://www.naturkundemuseum-bw.de/
https://speyer.technik-museum.de/
https://www.museum.speyer.de/
https://www.visitsealife.com/speyer/