Looks like a nice itinerary overall.
Since you're interested in WW II stuff, there are some Westwall bunker sites not far from Trier.
Your travel dates for these places will be needed if we're to suggest festivals or similar events.
I would try to get in at least one additional night in/near Bamberg. There's much more in the immediate area that you might enjoy... Nuremberg, Würzburg, Iphofen, Bad Windsheim...
"Arrive Stuttgart around noon pick up car and drive to Bacharach"
4 nights in Bacharach? In the interest of driving safety, I would not choose to add 2+ hours of driving immediately after a red-eye transatlantic flight when you might be facing jet-lag and general weariness as you navigate totally unfamiliar surroundings and negotiate road signage in a foreign language.
You're scheduled to arrive at noon, but it might be 1 or 2 pm if there's a flight delay, and even if it's on time, there's additional time needed to get through baggage, security, the rental office, etc. After all that, it's basically a meal, a shower, and a good night's sleep that you'll be after... and you can do that much closer to Stuttgart. I would shuttle to a nearby hotel and get the car the next morning. As you head north, make a stop in the Neckar River town of Besigheim, which advertises itself as Germany's most beautiful wine village. I think they might be right, too. Please check out the photos of Besigheim on the page below:
https://www.stadtbild-deutschland.org/forum/index.php?thread/2413-besigheim-galerie/
"Any recommendations for hotels/castle stays/inns/B&B's..."
Auf Schönburg Castle-hotel, roughly 5 minutes outside Bacharach, towers above the Rhine with incredible views and pretty stunning accommodations. Photo of Auf Schönburg from the river.
Other hotels nearby with superb views of the river include Hotel Rheinfels and the Rheinhotel St. Goar, a very nice place where DW and I stayed most recently; riverfront and balcony rooms are available there with maybe the best scenery in the Middle Rhine Valley of any in-town hotel. Excellent breakfast on the riverfront patio as well. This hotel and Hotel Rheinfels are just steps from the KD cruise boat dock in St. Goar (where cruises generally end their runs) about 10 minutes north of Bacharach. Here's the view from the hotel.
You should get lots of suggestions for Bacharach here from others as most forum members follow Rick's preferences (and he's very fond of Bacharach.) I've stayed in Bacharach before and I like Bacharach very much myself and would never suggest leaving it off your list of places to visit. But my experience in other towns like St. Goar and Boppard has schooled me to an understanding of the general convenience of making a base town in either the small St. Goar or the slightly larger town of Boppard, both a little way north of Bacharach, where there are a few more things to see and do in town (like Rheinfels Castle in St. Goar, like the chairlift and the developed waterfront promenade in Boppard) and where you are better positioned for outings (like Marksburg and Burg Eltz) and to other destinations. The car ferry in St. Goar runs well into the evening, another significant convenience, as there are no bridges in the immediate area. But a major thing for me is that Bacharach's hotels are tucked away well back from the waterfront. There's no such thing as a room with a Rhine view in that town, and there's not all that much to see and do there either.