I just plugged those two cities into the Deutsche Bahn website, and can now buy a ticket for a train leaving Stockholm in 8 hours (6:25 local time).
2 transfers (although routes exist with only one), 11:37 travel time. Saver fare still available: 99,90 € (regular would be 225 €). And it's not the only connection tomorrow.
That said, your point somewhat stands: it really depends on the route if good options are available, I've also looked at trips that seemed possible but I couldn't make work at all. Biggest problem is often the lack of overnight connections/night trains, which mean you're limited to what you can do during the day unless there's one of the exceptions on your route. Not fun if the only overnight "connection" means spending 2:30am to 4:45am on some train station.
bahn.de has an English version fwiw. But yeah it's non-obvious that it's the de-facto pan-Europe rail search engine. Other European train companies generally have pretty spotty cross-border information, while DB has almost everything. Even with tickets it can't book for you, it still usually has timetables and can show you an itinerary.
The best option should have one change, since there are direct trains from Stockholm to Copenhagen, and from Copenhagen to Hamburg (this train goes on the ferry). I would expect an additional change in Malmoe could reduce the cost and increase the time.
If you search for "now", it's 22:52, so you may get odd connections as the journey planner tries to make an overnight journey.
Wow, how does a train go on a ferry? A full, long train with many cars? Then the ferry would have to be that long too, which seems unlikely. Or is it that one or a few cars of the train go on each trip of the ferry, and the cars are all connected back together when back on land?
Interesting, didn't know. It felt like high-tech to me, anyway, since I had not seen or heard of train ferries before, although I did know about ferries that can take cars (automobiles) on board. Been on one such ferry in Goa, and my parents had been on some while visiting the US and Canada, I forget in which city.
Interesting that they don't support that at all, but yes, getting the data (and more importantly, the ability to book) shared across companies and network has been annoyingly slow and incomplete.
seat61.com will tell you which site to use for which route.
reiseauskunft.bahn.de knows several languages, including of course English.
There are also some pan-European booking sites, like loco2.com, happyrail.com and a few others. But these don't always manage to find the saver tickets, so you're sometimes stuck with full price.
2 transfers (although routes exist with only one), 11:37 travel time. Saver fare still available: 99,90 € (regular would be 225 €). And it's not the only connection tomorrow.
That said, your point somewhat stands: it really depends on the route if good options are available, I've also looked at trips that seemed possible but I couldn't make work at all. Biggest problem is often the lack of overnight connections/night trains, which mean you're limited to what you can do during the day unless there's one of the exceptions on your route. Not fun if the only overnight "connection" means spending 2:30am to 4:45am on some train station.