Q. Can one who is not obligated to recite the hagomel brocho, recite it for someone else who is present and cannot say it himself, and be motzi him with the brocho?

A. Shuchan Aruch (O.H. 219: 5) rules that if someone recited hagomel for his own need and sake, and at the same time had intention to be moitze and have his listening friend fulfill his own obligation to recite, the listener does indeed comply as long as the person reciting was also obligated to recite this brocho. Some Poskim therefore maintain, that when a community or group of people are subject to this blessing, one can recite for all. Others maintain that it is better that each one should recite for himself, unless they all shared the same experience and are thanking for the same salvation. (Piskei Teshuvos 219: 17)
However, in the prior seif (4), Shulchan Aruch rules that if the brocho was recited using wording that refers specifically to the favors granted to the listener, (Blessed be Hashem… Who bestowed goodness to you) he complies even if the one reciting is not obliged in this brocho. Rema (ibid.) explains that even when one recites the usual nusach, it is not considered an unnecessary brocho levatala, since he is indeed pleased and rejoices in the happiness of his friend. Biur Halocho quotes Eliahu Rabba, and Beis Yosef that only a son or a disciple, should recite for his father or teacher since; we do not find someone not obliged, blessing this kind of brocho for others. See Talmud (Brochos 54b). Also questions 610 and 1696 on husband reciting hagomel for his wife’s sake.
Based on the above, Horav Shlomo Miller’s Shlit’a opinion is that since Poskim also disagree if there is an actual obligation to recite hagomel (Mogen Avrohom 219), one should not recite this brocho for someone else, unless he is also reciting hagomel for his own needs.
Rabbi A. Bartfeld as revised by Horav Shlomo Miller Shlit’a