Our attraction to Heidelberg is its small town charm (as opposed to
Frankfurt) for a 1-day restful layover before our road trip to explore
other historic cities and castles. From Heidelberg we are driving to
Rothenberg and then to Sankt Goar, our hub for the Rhine Valley and
then back to Frankfurt.
I think the comments by Nigel and KGC should be under your careful consideration.
Heidelberg (roughly 160,000 population!) might be a worthwhile place to visit - but it is not at all a small town, and as has been pointed out, it will actually be a detour of some distance - It would make more sense to me if you picked a town that better fits your criteria and that's actually on your route to your next destination.
St. Goar is a good base town for you on the Rhine. It's not clear how many days you have here, but in St Goar, you are actually surrounded by cool old-world towns. I hope you have 3 days or so for exploring, visiting Marksburg Castle, cruising, and scoping out some of these smaller towns...
Braubach (scroll 3 pages of photos)
Oberwesel - walk the remaining elements of the old town wall and check out its 18 towers.
Bacharach (see Rick Steves)
Rüdesheim (touristy, but there's some history there and you may enjoy the gondola ride there and the views from up top.)
Eltville - very pretty old town on the waterfront just upstream from Rüdesheim
The Middle Rhine Valley is definitely not the one-night stop sort of place that Rick Steves sometimes makes it out to be.
My first thought is that you might substitute ELTVILLE for Heidelberg. It meets your criteria well and is only one hour by train from FRA airport... and it's right on your drive to Rüdesheim and St Goar (use the car ferry in St Goarshausen.)
My second thought: On the morning of Day 2, you could catch a train to Wiesbaden (14 minutes away) to pick up your car.
I guess if you have time for Rothenburg after all this, then sure, it's a small old-world town, and you could perhaps make the long drive there, but since you're returning to FRA airport at the end, I'd look into the Mosel Valley towns instead. Cochem? Traben-Trarbach? Beilstein?
https://www.mosel-inside.de/en/travel-guide/mosel-villages.html
The map below shows how close these Rhine and Mosel towns put you to FRA. It's a train map, but still makes the point.
https://www.seat61.com/images/rhine-train-map-detail.jpg