@dominicstucki this is a very common thing to happen on this very connection. Sometime the ICE commoning from middle west or northern Germany terminates in Freiburg or Basel Bad instead of Basel SBB or Zürich, then you either have to take S6 from Basel SBB to Basel Bad or sometimes the 7 minutes past the full ICE from Basel SBB to Basel Bad.
Sometimes it is badly communicated as in your case and passengers are just left in Basel/Zürich, but mostly there is some arrangement like described by you.
I guess this happens every other day.
Hope you reach Hamburg soon.