I was trying to think of one in Berlin, but on weekend nights the metro trains run all night, and don't really cross over huge gaps of non-city like the one highlighted in the article. At any U-Bahn end station on a party night, you'll wait 15-30 minutes and get on the next train going the other way. On non-party nights, get out your navigator app and wait the same for a night bus.
You could definitely take a regional train passing through the city, for two hours to somewhere like Magdeburg, but you don't get on those by mistake as they run infrequently, only stop at the bigger stations, and have separate platforms.
In Copenhagen you could reasonably plan to go from the central station to, say, Høje Taastrup, but fall asleep and end up in Aalborg 5 hours and 400km away.
Høje Taastrup is a large suburb at the edge of Copenhagen, and the end of an S-train line, but anyone who lives there will know an intercity train is faster. Trains to Aalborg stopping at Høje Taastrup leave at 00:50 and at 02:50 tonight. The other suitable intercity and regional trains overnight are to nearer places, 150km or so.
You could definitely take a regional train passing through the city, for two hours to somewhere like Magdeburg, but you don't get on those by mistake as they run infrequently, only stop at the bigger stations, and have separate platforms.