This is an important and complex question.
Egg freezing for fertility preservation is often permitted. However, the procedures involved entail some medical risk and can be challenging to navigate. There is also some cost involved, and sometimes ethical questions about diverting medical resources. These issues bear halachic weight. They are more readily surmountable when there is a present need or in cases in which there is strong reason to think that a need will arise.
It is more difficult to permit a semen analysis or freezing embryos in this situation, since there is no current fertility concern and there is not even any certainty that you will use what is frozen.
We cannot rule out the possibility that something like what you suggest will become accepted practice in a few decades, as the technologies develop. At this stage, while we would not recommend pursuing fertility preservation, there is still room to consider egg freezing in order to maximize your options. We recommend that you and your husband first take some time to think further about the circumstances in which you would envision yourselves turning to assisted reproduction.
We hope and pray that you will be able to have as many children as you desire. The Talmud teaches that the keys to fertility lay in God’s hands. Even as our ideas about appropriate medical intervention evolve, we must accept that there are never guarantees, biological or otherwise, that a given couple will be able to have children.
Please let us know if we can be of further assistance.