The 19-year-old assisted City's first, after squaring the ball to Bernardo Silva, and spectacularly scored their fourth from a tight angle.
Those goals were sandwiched by a strike from Gabriel Jesus, who capitalised on a mistake from the Swindon defence, and a Ilkay Gundogan free-kick.
But Swindon did have their moment, as Harry McKirdy, who scored four goals against Northampton in the league last week, fired past Zack Steffen in the City goal.
That was just a consolation but Townsend was impressed with the former Aston Villa forward, who didn't stop running.
"He has chased, put his head down, and most of it has been to no avail.
"Rodri gets caught, Williams chooses the right pass, the striker takes it from a tight angle, and fires it past Steffen."
Swindon were guilty of overplaying at times, with Robins boss Ben Garner keen to play out from the back, but his side gifted City chances due to their style of play.
And Townsend labelled the League Two side as 'naive' at times, after Jesus goal came from a sloppy Cruyff turn from a Swindon midfielder.
"They're trying to play out from the back and City are after them like they'd come after Liverpool or Chelsea - with genuine pace," Townsend added.
"Swindon are trying to play out with their centre-backs and that is naive. That's not unlucky, that's just not playing sensibly.
"There's nothing wrong with playing in the right situation, but that was silly and unnecessary."
More to follow…