That seems like a lot to do in 9 days, especially if you want to add on Amsterdam. Have you visited Germany before? (I hope you're not hoping to go to Oktoberfest, because that is mostly in September!) Most of what I'll put here are for first-timers. The weather in October can be all over the place- temperatures will be mostly in the 50s plus or minus, and you will need an umbrella. The sun comes up around 7:30 and goes down by about 6pm.
There isn't much to do or see in or around Frankfurt from a tourist perspective, so I wouldn't plan to spend much time there. Renting a car right at the airport is easy.
You say that you want to drive south down the Rhine from Frankfurt- that area isn't the most scenic part of the Rhine. You might consider taking a day trip on a Rhine River cruise in the other direction to see castles and cute waterfront towns- I recommend this one:
https://www.k-d.com/en/. October is the end of the season and it will be colder and rainier, but it makes for a nice day a


nd very typical of what people think of when they consider Germany. I usually drive to Bingen, not far from Frankfurt, then take the boat as far as Koblenz, then take the train back to Bingen.
Heading south from Frankfurt, you could visit Heidelberg Castle. How far south are you talking about? Black Forest? All the way south to Neuschwanstein Castle? If you do, there is a series of roads called the Alpine Highway that makes for a spectacular drive in some areas (
https://www.deutsche-alpenstrasse.de/en/home). It goes from Lake Constance beyond Munich toward Salzburg.
If you don't go that far south and instead go east, you could visit the walled city of Rothenburg (
https://www.rothenburg-tourismus.de/en/), which is also really nice to visit for a day trip.
Munich is a great city with an excellent subway system. Most of what you would want to do and see are in the city center, with the exception maybe of Dachau, if you wanted to visit there. It's an easy trip by train and then bus, even for people who are not too familiar with public transportation. I would get rid of your rental car on arrival in Munich.
It is a long and boring drive from Munich to Berlin, at least 5-6 hours or so. It is an equally boring train ride to Berlin, but at least you could relax during the trip which is closer to 4-5 hours. You won't need a car in Berlin either, so I would lean toward making the trip by train.
I absolutely love Berlin. You'll get tons of suggestions about what to do and see. One thing that bums me out a little is that the difference between the former east and west Berlin is really being lost.
The train from Berlin to Frankfurt is also 4-5 hours. You can search trains and make reservations online here:
https://www.bahn.com/en/view/index.shtml. Just beware that the trains (at least the fast trains) are not cheap. They can sometime cost as much, if not more, than flying on some of the discount airlines. Look around as you finalize your plans.
The idea of adding a side trip to Amsterdam really doesn't make any sense to me. It's pretty far away and would really suck up a lot of your time that could be better spent elsewhere on this particular trip. You might want to save Amsterdam for another time.