> a rail station has quite a limited capacity
most new&large airports are far outside of cities (example: Munich, Frankfurt, Berlin, ...) because of the enormous space needed and environmental problems is creates. Nearer airports will close operating at 10pm, whereas train stations will operate 24h no problem.
Large projects for new train stations/systems in major cities (Hamburg-Altona, Stuttgart, ...) take a long time, but they exist. Large new airport projects near (!) major cities here in Germany don't exist.
> Most of the German trains are slower than 300kph most of the time.
That's because Germany has dense population regions and there always will be stops in cities and a lot of passengers. It's an optimization question. Being able to run a train system with max 300kmph is much more expensive than at 250kmph and the advantages are not that huge.
> They are also often crowded, delayed or outright cancelled. They are also quite expensive, compared to planes.
Planes are always crowded with a tiny personal space, difficult to board/leave, difficult to work in, difficult to reach, subject to a complex passage on an airport with all its rules®ulations, longer upfront booking, ...
For example when I want to travel from Hamburg to Düsseldorf (400km) on wednesday morning, the price is around 35 Euros incl. local public transport tickets with my Bahncard 50 which I got from the company. There is no flight like that.
Hamburg/Munich: >600km. Already too long for a business trip by train. Cost 60€ with Bahncard 50 incl. local public transport tickets. Time: 6:30 center to center. Flight: much more expensive, unreliable (I remember been waiting on friday evening two hours on the runway for the start), Munich airport is 40km outside, the Munich airport has long transit times. Time from city center to city center by flight is around four hours. The travel costs about three times as much.
> Most of the German trains are slower than 300kph most of the time. They are also often crowded, delayed or outright cancelled. They are also quite expensive, compared to planes.
For certain longer trips, but if I want from Hamburg to Berlin, Frankfurt, ... I take the train.
> especially if it's inside the city
That's great: with an ICE I want to reach the city center and not some airport 40km outside (like in Munich). I want to be in a big hub where all the local transports are reachable.
High-Speed trains here are connecting centers of a large local public transport system: local trains, underground trains, busses, ferries, ... When I travel by train between Hamburg and another major city, the tickets for much of the local transport systems for the start end destination cities are already included.