Add all ingredients to a medium saucepan and press as much of the fennel below the oil as possible (the oil will barely cover everything at first but it will cook down later). Bring to a simmer over medium heat, cover, and reduce to low to maintain a very low simmer. Cook for 1 hour, stirring occasionally, or until the flavor the oil has reached your liking. Remove from heat and strain through a fine mesh strainer set over a medium mixing bowl. Allow to cool to room temperature, transfer to an air-tight container and store in the refrigerator.
I tried a batch using only a few orange zest strips and didn't get a lot of orange flavor. The next batch I increased it to 6 strips and the orange flavor was pronounced. Hopefully that helps you decide how many to use.
I tried a batch using 1/2 teaspoon red pepper flakes and didn't get much of any heat. The next batch I increased it to 1 teaspoon and while not spicy, there is a little kick on the finish.
I haven't tried cooking the oil any longer than 1 hour as I assumed all of the fennel flavor has been extracted at that point. But I would love to know the results if you cook it longer!
Heat oil over medium heat in a 12" non-stick skillet until shimmering. Add the onions, salt and pepper and cook, stirring occasionally, until translucent and just starting to brown, about 5-7 minutes. Add the remaining ingredients and bring to a boil. Reduce to a simmer and cook until almost all of the liquid has evaporated and the mixture is jammy, about 15 minutes. Taste and adjust seasoning as needed. Transfer to an air-tight container and cool to room temperature. Store in the refrigerator for up to 2 weeks.