There's only one rule for apologizing: You apologize if you actually believe that you've done wrong. NEVER apologize for something you believe was done correctly or in good faith or for "PR" or whatever else.
Not listening to this advice is 100% the reason why people don’t trust a lot of public apologies: too many people/companies “apologizing” by saying “I’m sorry you got mad” or “I’m sorry you found out about this”. If you apologize, mean it. If you don’t mean it, don’t apologize.
Every time a person/company apologizes for getting caught, it demeans public trust in everyone’s apologies.
The problem is the "good faith" bit ... that often isn't visible downstream, and to external stakeholders it looks like you are making excuses.
For example, if I make a commitment to somebody and then circumstances outside my control prevent me from fulfilling it, I may very well say "it's not my fault, apologising would be insincere". But to an external stakeholder what they see is they are wearing consequences and I am not accepting accountability. There are a million shades of gray according to how much I could / should have anticipated the eventuality ... but that makes it really not simple to make this kind of call, and I would have to say, if you are going to err, I would rather err on the side of apologising than not.
I think only you can answer that question. Part of a good apology is knowing one-self and self-reflection. Unintended consequences happen, yes, and I don't think one could argue one way is always the right answer in all cases. Just remember rule 1 and that is _you_ that is giving the apology.