Pension reform is a crucial societal problem in many countries, and traditional pension schemes, such as Pay-As-You-Go and Defined-Benefit schemes, are being replaced by more sustainable ones. One challenge for a public pension system is the management of a systematic risk that affects all individuals in one generation (e.g., that caused by a worse economic situation). Such a risk cannot be diversified within one generation, but may be reduced by sharing with other (younger and/or older) generations, i.e., by intergenerational risk sharing (IRS). In this work, we investigate IRS in a Collective Defined-Contribution (CDC) pension system. We consider a CDC pension model with overlapping multiple generations, in which a funding-ratio-liked declaration rate is used as a means of IRS. We perform an extensive simulation study to investigate the mechanism of IRS. One of our main findings is that the IRS works particularly effectively for protecting pension participants in the worst scenarios of a tough financial market. Apart from these economic contributions, we make a simulation-methodological contribution for pension studies by employing Bayesian optimization, a modern machine learning approach to black-box optimization, in systematically searching for optimal parameters in our pension model.