Basically the state spends to much money on humans in general. A young qualified immigrant might have a less negative impact than a slightly older German person, but both of them will be money sinks in the long run.
Statistically immigrants in Germany are less qualified than the general population, so they’ll have an even more negative impact.
The only valid solution is to reduce the spending per person, both birthrate and immigration will only delay the problem.
Denmark should be in a slightly better position than Germany since their health system is cheaper.