Hey! I got the train from Brussels to Copenhagen via Hamburg recently, use Eurostar a lot etc.
I think your best bet would probably be getting the Eurostar from London to Brussels, then taking the ICE to Cologne (in my experience it’s cheaper than the Thalys but if you’re booking in advance there’s not a big difference) then getting a local train to Hamburg (this won’t be a high speed train and it’s not quite as nice as the ICE but has a restaurant car and it’s pleasant enough).
London - Brussels is 2 hours + 30 mins to check in. Brussels to Hamburg is about 6 hours 30 mins + 30 mins to change trains in Brussels (they sometimes do passport checks on international trains in Europe now, following the attack on the Amsterdam - Paris train last year).
So should take you about 10 hours from London including changes.
Don’t book it all on Eurostar, it can be more expensive than buying from the separate sites.