...does anyone think there a correlation to these problems and the
money they are losing by offering the Deutschland ticket?
Who knows? It's certainly a reasonable guess that over-packed trains are the result of a funding shortage for new train cars, etc. "Ein Wagen fehlt" (this train is one car short) was a message I saw multiple times on the trackside annoucement boards during my recent visit. It's not like they LOST it... they likely borrowed it for use on a route somewhere else where they expected even heavier ridership. That's what you do when you can't afford the equipment you need, I guess... spread the over-crowding around.
I do agree that it should only be offered to residents, since they are the ones paying taxes to subsidize this.
I don't think so. ALL public transportation is subsidized. Whether you ride the U-Bahn in Munich or the Strassenbahn in Berlin, or BART in San Francisco, the fares paid by citizens and tourists do not fully subsidize the system. I'm trying to imagine what it would do to tourism in SF if tourists were outlawed from SF's public transport systems or from its discount programs.
Some governments intentionally target tourists with transport subsidies to encourage tourism... the free use of trains and buses in the Black Forest, in Boppard, and in Berchtesgaden, for example. The tiny tourist tax (usually €1-2/day) paid for these freebies can't possibly cover actual transport expenses - but the scheme is that the other tax dollars dropped by tourists will make up for this loss.