> Germany is impressively well connected by rail
It's not only trains. There also buses. As a already sad, you can travel from one random location to another using public transport only, and it's very unlikely you will have to walk more then 1000m to the nearest bus stop.
> Spain and Portugal for sure have less services but in my experience they're more reliable
This is also a part of the story. If you have only 2 trains a day from A to B it's much easier for the trains to be on time. But In Germany they have trains in each popular direction (say Munich to Berlin) *at least* once in hour.