Jean Segura added three hits for the Phillies, who will go for the four-game series sweep on Thursday night. Cristopher Sánchez (2-1) struck out seven in six innings, and David Robertson got three outs for his 18th save.
"It wasn't a lot of homers tonight or big hits, it was keeping the line moving," said Philadelphia's Alec Bohm, who had an RBI single. "Nobody was trying to do too much or be a hero."
Philadelphia is in second place in the NL wild-card standings, and it looks as if help is on the way.
Bryce Harper had three hits and two RBI on Wednesday night in his second rehab start at Triple-A Lehigh Valley, including a game-ending double in the ninth.
"Not surprised," Bohm said. "We're looking forward to getting him back."
The 2021 NL MVP, who has been out since June 25 with a broken left thumb, is eligible to return from the injured list on Thursday. The original plan was for Harper to remain in Triple-A until Saturday, but it's possible that the timetable could be moved up, Phillies interim manager Rob Thomson said.
"I haven't talked to him yet," Thomson said of Harper. "I heard that he had another big night, so we'll need to talk to him and see where he's at."
"They just beat us tonight," Farmer said. "We're going to show up and work and try to win a ballgame every day. That's our job, and that's what we're trying to do."
Sánchez, making a spot start to give Philadelphia's regulars an extra day of rest, was charged with three runs and six hits.
Cincinnati put runners on first and third in the ninth, but Robertson got Farmer to bounce into a game-ending double play started by Bohm at third base.
"Anytime you can get a four-game sweep, I don't care who it's against, it's not easy to do," Bohm said. "We're looking to get another win tomorrow."
After failing to score with the bases loaded and one out in the first, Philadelphia took a 2-1 lead in the second on Matt Vierling's RBI single and Hoskins' run-scoring fielder's choice off T.J. Zeuch (0-3).
Realmuto led off the third with his 14th homer, and Zeuch's night was over later in the frame when he walked Kyle Schwarber with the bases loaded to make it 4-1. The Phillies scored two more in the inning when Art Warren walked Hoskins with the bases loaded and surrendered Bohm's RBI single.
Zeuch was tagged for six runs and seven hits in 2 2/3 innings. He has a 15.19 ERA in three starts this season.
Farmer hit his seventh homer in the fourth. Jonathan India added an RBI double in the fifth, and TJ Friedl's sacrifice fly trimmed Philadelphia's lead to 6-4 in the seventh. But Hoskins responded with an RBI single in the bottom half of the seventh.
Chuckie Robinson made his big league debut at catcher, becoming the 58th player used by the Reds this season - a club record. Robinson singled and struck out in two at-bats.
Philadelphia's Nick Castellanos extended his hitting streak to 14 games with a fourth-inning single. He is batting .367 during the stretch.
Reds: India (leg) was lifted from the game after the sixth inning. ... INF Mike Moustakas was not in the lineup after injuring his left calf in the eighth inning on Tuesday. ... INF Matt Reynolds (left hip pain) returned to Cincinnati for treatment and further evaluation after being placed on the 10-day IL on Tuesday. Reynolds left in the seventh inning of Sunday's 9-5 win at Pittsburgh due to hip soreness. ... RHP Hunter Strickland (right shoulder strain) threw a bullpen session on Wednesday and could face live hitters on Saturday. Strickland last pitched on Aug. 1.