In a large skillet or Dutch oven, cook bacon over medium-high heat, stirring occasionally, until fat is rendered and bacon is lightly browned, 10 to 15 minutes. With a slotted spoon, transfer bacon to paper towels to drain.
Pour off all but 1 tablespoon of fat from skillet; add onions and cook, stirring occasionally, until translucent, about 5 minutes. Add garlic and red pepper flakes and cook until fragrant, about 30 seconds.
Stir in coffee, vinegar, brown sugar, and maple syrup. Bring to a boil, stirring and scraping up browned bits from skillet with a wooden spoon, about 2 minutes. Add bacon and stir to combine.
Reduce heat to a bare simmer and cook uncovered, stirring occasionally, until liquid is syrupy, 1 to 1 ½ hours.
Transfer to a food processor; pulse until coarsely chopped. Let cool, then refrigerate in an airtight container up to 4 weeks.
