You should split the search to find more results. :)
Planners will always give the fastest route, even if it means “risky” connections.
On some dates there is a (Cerbère -) Narbonne - paris night train, otherwise there is the daily Toulouse - Paris. I’d indeed try to get either of them as they’re fantastic value (20-25€ for a couchette).
Afterwards you could spend the day in Paris and take the Paris - Berlin night train (not daily). Berlin - Hamburg is rather easy.
2 other options:
- Paris - Freiburg TGV + night train to Hamburg
- fully during the day (but it’s quite long)
What would be the travel date?
Times are subject to engineering works (plenty of them!) but it could look as follows:
- night train arrival at 7am
- explore Paris
- TGV Paris-Est - Freiburg (Breisgau) Hbf 17:24 - 20:26 20€ reservation
- have dinner maybe
- NJ Freiburg (Breisgau) Hbf - Hamburg Hbf 22:58 - 07:53 (+ delay)
Also possible to board the night train already in Basel for a longer night.