The top-ranked Serb had breezed through the previous two rounds, his first matches since being defaulted at the US Open for hitting a line judge with a ball, but faced a potentially tricky test when Koepfer levelled the contest at one set apiece.
However, Djokovic regained his focus to close out the victory and stay on course for his 36th ATP Masters 1000 crown.
He takes on Casper Ruud for a place in the final after the Norwegian battled past fourth seed and local hope Matteo Berrettini 4-6, 6-3, 7-6(5) in their last-eight clash.
"Clay is definitely Casper's preferred surface. This is where he feels most comfortable. It's semi-finals and it's anybody's game," said Djokovic, who will be targeting his 30th victory from 31 matches this year. "I'll do some homework and be ready for that one."
In the women's draw, 2018 French Open champion Simona Halep advanced to the semis when her opponent Yulia Putintseva retired due to a lower back injury while trailing 6-2, 2-0.
The top-seeded Romanian will now meet Spain's ninth seed Garbine Muguruza, who survived an early scare against Victoria Azarenka to beat the US Open runner-up 3-6, 6-3, 6-4.
Halep said: "Every time I played well against her (Muguruza), I was as much as possible aggressive. If I play my best game, and if I feel great physically on court, I have a big chance to win the match. But every time is different, because she's playing so hard. You don't really know what to expect. It's tough."
Twice Rome champion and fourth seed Elina Svitolina of Ukraine, who skipped the US Open to prepare for the claycourt swing, was stunned by Czech Marketa Vondrousova 6-3, 6-0.
Number 12 seed Vondrousova will play compatriot Karolina Pliskova in the semis after the defending champion survived a mid-match scare to beat Belgium's Elise Mertens 6-3, 3-6, 6-0.