It really depends on what you are fasting for and what you quantify a fast as. I think Ronda Patrick has stated in the past that (by her definition) black coffee would break a fast as it causes a hormonal response in the body. Other people however would say black coffee doesn’t break a fast as it doesn’t cause an insulin response specifically.
I think the distinction between the two is probably irrelevant for 99.99% of people who fast though, so I wouldn’t class black coffee as breaking a fast personally.
I honestly have no issue with drinking black coffee during a fast. It’s zero calorie and I drink it for the same reason you do because if I didn’t, I would be completely incapacitated for up to a week while I dealt with caffeine withdrawal headaches.
Some people I know feel they need to cut caffeine to fast, and that’s fine for them. I’ve done it before, there is nothing wrong with that. But for me, drinking black coffee has a lot of benefits and in no way ruins a fast for me.
I know people who drink juice during fasting and I don’t agree with that, but I say that to say fasting can be subjective and you should do what is right for you.