Everyone has this problem. Birth _rates_ are declining everywhere. Different countries are just in different parts of the decline. Even if this is your reason for importing immigrants and you think it’s worth any negatives, you are simply helping the boomers and doing nothing to help later generations. In addition, you are making the situation dramatically worse for migrant origin countries as their young people leave to be workers somewhere else.
I do think it’s also worth asking, if you keep this policy up, what you mean by “Germany.” If it’s an economic zone defined by arbitrary borders, all well and good, but if you think anything more of it than that, then obviously importing immigrants to create a square or non-inverted population pyramid means that at some point in the next century, German culture, norms, morals, and ethnicity will be a tiny minority in Germany the economic zone. If you’re okay with that tradeoff then alls well, but it seems worth acknowledging. I did some rough calculations with Canadian demographics for example, and in 80 years Canada will be totally unrecognizable as it will have had near-total population turnover via migration. Unless birth rates suddenly skyrocket instead of declining, or immigration comes to a screeching halt.
The future is never really predictable, but it’s looking like the future of a lot of Western countries is that they’ll end up basically satellites of countries like India, China, or Turkey. (Of course they’re facing their own declines, particularly China, but there’s a lot of quantity involved.) It’s also unclear to me that voting blocs of young voters will continue to fund entitlements. It will be pretty interesting to live through. I think the closest historical parallel is the total collapse in the Roman population during the early empire.