This is one of those easy-to-answer hard-to-explain questions.
Let's examine them all to see what works and what doesn't.
You are fortunate for having an intelligent and obedient son.
Fortunate is an adjective. We are saying that you are fortunate, and then explaining what is causing you to be fortunate. When explaining causation, for can be a suitable choice.
He lives happy for all is well.
You are fortunate of having an intelligent and obedient son.
You cannot use of this way with fortunate. Of is a word that explains a cause, origin, direction, or feature of something.
He is of noble birth.
She is living west of here.
I am drinking a cup of juice.
You can never say: He is of having. It is not a sensible construction.
You are fortunate in having an intelligent and obedient son.
You can make a case for in here. In is a word that implies you're including something.
I was in the red until I got my finances in order.
She was in trouble for something she did not do.
While it is not the ideal answer, you can easily make a case for it.
You are fortunate to having an intelligent and obedient son.
To implies an action or a direction.
I am walking to the liquor store.
I am trying to get drunk.
I am going to regret my actions.
We generally do not say to having. You can say have to as in
I have to pee.
The best of the four seems to be for. You are lucky for your health. You are happy for your success.