If you were to fly into FRA with the intent to head straight to Rothenburg, the cityon your list that is closest to FRA, you'd have a post-flight train journey of 3+ hours with at least 2 changes of train right after your flight. That might be taxing right after an overnight transatlantic flight.
From MUC airport to Munich proper it's around 40-45 minutes by direct train, a much easier Day 1 trip. I'd start there. Maybe arrive late in the day on the final night of your trip at FRA airport and stay at an airport-hotel.
Rick Steves' tours offer 1 night in Rothenburg, 1 in Salzburg, and 2 in Munich. I would suggest slightly longer for Munich and for Salzburg since you are going independently. So if you went with 3 in Munich, two in Salzburg, and one in Rothenburg, that leaves 4-6 additional nights.
As for seeing other medieval towns... a good idea, IMO... I'm sure that you will have more than enough time to see some of those in addition to R'burg, Munich and Salzburg.
And you can easily use the train to see other medieval towns before you fly home. I suspect that shoeflyer was unsuccessful in finding trains for the reason that only certain medieval towns were under consideration. The towns listed below are some of Germany's best medieval towns and are easier to reach by train than Rothenburg is....
Regensburg (UNESCO World Heritage old-town center; train from Munich)
Bamberg (also UNESCO WH; train from Munich or Rothenburg)
Neuburg an der Donau (train from Munich)
Nördlingen (train from Munich)
Nuremberg is also excellent... destroyed heavily in WW II (like Rothenburg was) but rebuilt with the past in mind... beautiful and walkable old town center, lots to see and do. Train from Munich or from Rothenburg. It's actually on the way to Rothenburg from Munich by train.