In addition to the other great answers here, I would like to point out that this statement:
that means that there should have never been a generation who received benefits and who did not make proportional contributions into the system first, which also means, that Generation A's benefits should be paid by Generation A's contributions, not the younger Generation B's contributions
Is irrelevant to the conversation. Whether the first beneficiaries received funds or not, the current state of affairs is that there does not exist some huge pile of money saved up from retirees' past contributions to pay their current SS withdrawals.
Even if there was such a pile, it would still be mostly irrelevant. The reason why is that people cannot eat literal money, they cannot build houses out of literal money, and they cannot fill their tank with literal money. They have to eat bread that is grown by the hands of non-retired folks. They have to build houses with timber cut and hauled by non-retired folks. They have to fill their tank with gas from refineries kept running by non-retired folks. The amount of money that retired folks have in a pile will not increase the total production of non-retired people. If we, as a society, decide to give the retired bread, housing and gas, then whether that bread, housing and gas is gotten via a middle-step of a pile of money, or if it is just taxed to the current generation, the amount of resources given to the retired is the same, and the amount of resources left for the non-retired is the same.
I say "mostly" irrelevant, because this assumes a closed system, and interest from loans to foreign countries, etc come into play.
In other words, the "two" systems: "Generation A's benefits should be paid by Generation A's contributions, not the younger Generation B's contributions" are in reality the exact same system. Since the government literally prints the money, then whether or not they have a pile on hand that represents current retirees' payments is totally moot. They could create the pile on demand, or burn it, and the amount of money "available" to them is identical. Printing the money is essentially a tax on the non-retired. Or they could tax the non-retireds' income (this is the current scheme). Or they could tax the non-retired in some other way. Either way, the retired can't generate their bread, housing and gas because they're retired. The non-retired are the ones paying the bill no matter what system you instate.
In this light, your question: "Shouldn't the ratio of retirees to workers be completely irrelevant?" is a "no" in all possible retirement systems, and is not a function of whether or not there exists a pile of money to draw on for retiree's payouts. The non-retired must foot the bill in terms of bread, housing and gas.
As an extreme example to get your imagination juices flowing, imagine a world where everyone is retired except for one person: you. No matter how much money the retired have saved up and are willing to give you, you can't possibly generate the bread, housing and gas for them all, much less have any left over for yourself. Their money has nothing to do with the problem. You are physically limited as to how much you can produce. This applies if there are two non-retired people vs a world of retirees. It also applies if the ratio of retirees to non-retirees is too high. If the number of people actually generating the bread is too low compared to the number of people eating the bread, then there will not be enough bread.