In a large heatproof bowl, using an electric mixer, beat the sugar and egg whites until mixed. Place the bowl over a large saucepan of simmering water; do not let the bowl touch the water. Heat the mixture, whisking occasionally, until the sugar is dissolved, about 5 minutes. Remove from the heat and beat at high speed until fluffy, about 3 minutes. Beat the the meringue at medium speed until cool to the touch, about 5 minutes. Beat in the butter several pieces at a time, waiting until they are incorporated before adding more. Whip the frosting until fluffy. (If the frosting appears lumpy, beat at high speed until smooth. If the mixture is soft and runny, refrigerate for 5 minutes, then beat again.) Beat in the espresso and vanilla until blended.