Everybody already has local regional tickets anyway. And most people can't be in more then one place at the time anyway. And most people stay in the same region most of the time anyway.
So really you are not losing much compared to having separate local region tickets in a system where the long distance trains are separated.
> who cleans and repairs the trains
The already existing organizations that have run the trains for a long time.
> who invests in infrastructure and all that
The government ...
> I always wonder how the germans can pull this off for 50 Euro. Magic.
Its not magic its just a transportation policy and taxes.