Cut the bacon into 1/2" slices and add to a large frying pan. The bacon pieces will separate as they cook. Cook over medium-high heat, stirring, frequently until the bacon is cooked but not super crispy. A few crispy bits are fine.
Remove the bacon from the pan with a slotted spoon and set it aside. Pour out all but about 1-2 tablespoons of the drippings and reserve for another use.
Add the onions to the pan and cook for about 10 minutes then reduce the heat to low. Add the sugar and stir well. Continue to cook until the onions have caramelized, about 20+ minutes. Add the espresso (or coffee) and the bacon and increase the heat back up to medium. Continue to cook, stirring occasionally until thick and jam-like, about 30 minutes
Remove from the heat and stir the balsamic through adding more to suit your taste. Add salt if desired.
For a uniform consistency, put it in your food processor and pulse until you are happy with the result.