The swiss have a more challenging geography and weather than Germany.
They also spend far more per capita on their train system.
All that and afaik they still manage to connect all important places.