Several years ago on my way back from my several months in South Africa I did this trek (all on Eurorail Pass and staying at random hotels or hostels I found when I got off the train (so just kind of winging it)
Only listing major cities/towns: Frankfurt am Main -> Nuremburg -> Munchen -> Linz -> Wein -> Salzburg -> Innsbruck -> Vaduz -> Lucern -> Zurich -> Baden -> Basel -> Freiburg im Breisgau -> Strasbourg -> Mannheim -> Frankfurt again for the flight home.
Skipped Czechia in order to avoid an additional currency exchange (having to get Francs for Liechtenstein and Switzerland was bad enough).
Cool thing about the Eurorail Pass is that they offer options that include things like unlimited rides on X number of days over the course of Y period. Example: you can take as many rides on supported lines (basically anything but upgraded business class and such) on any 14 days over the course of a month. So, if you take an early morning train that counted as 1 travel day, you arrive in one of the smaller cities, spend the day wandering, and if you leave the day you arrived on an overnight train that only counted as 1 travel day. Then you get to a larger city and spend multiple days there then repeat. Not sure if it still functions exactly like that, but it was a really easy way to cover a lot of area pretty cheap (sleeping on the night train saved on accommodations and you could get single rooms at a hostel for around 13€ [about $15]). Pretty sure the train pass ran me something like 300€+, but it seems like the options are steeper and more limited now.