Hi, Dr Ahmed,
The structure "afraid to" is mostly used when you are about to do something and you are afraid of it, while "afraid of" is used to express a general fear.
On page 27 of this dissertation, the author says:
Wierzbicka (1988) contrasts:
(25) a. I am afraid to cross the road.
b. I am afraid of crossing the road.
Again, only in 25a is the speaker presumed to have some intention of crossing the road. This difference in interpretation is argued to account for why 26b is infelicitous, except, where the falling is interpreted as somehow volitionally intended.
(26) a. #1 am afraid to fall down.
b. I am afraid of falling down.
On this basis, "being punished" is not something that depends on the subject's will and, therefore, it would be more appropriate to say:
- After breaking the vase , the child was afraid of being punished.
Notice this example I produced with both forms:
- The child was afraid to touch the vase — he was afraid of breaking it. ("touching" is voluntary; "breaking" is not.)