I don't mind the idea of a deity permanently taking away a cleric's divine powers for gross or consistent misconduct.
What I dislike is the idea of them dealing out piecemeal punishments by not allowing them to get some of their daily spells, etc. Most players are going to hate that, and I'm not a fan of classes being dependent on in-world fiction to use their powers. I'd prefer all character classes to be on the same basic footing.
So once a cleric or warlock gets their powers, they have them and don't need permission to use or regain them day to day.
In my lore, divine power original comes from deities, but once they invest it into mortals, those mortals are the ones directly passing it on to others. So the god probably did this hundreds or thousands of years ago, and your cleric got his investiture from a cleric who got it from another cleric, etc, stretching all the way back.
Now, if a cleric is acting completely against the wishes of the deity they profess to serve, they could potentially use their divine power to strip them of their abilities (you know, just like they could strike them down with a bolt of lightning, or send an army of angels after them), but it's more a matter of using their power to inflict this loss on the cleric, than turning off an ongoing stream of power.
With warlock patrons, it's even easier, since there is already the idea that once you get abilities from the patron those abilities are yours to keep. The general idea seems to be that you need to stay in their good graces to keep getting more abilities as you level up. I dislike that one for the exact same reason as I do with the cleric issue. I just say that investing a warlock is the same basic concept, but usually the patron does it directly. The warlock then can level up without any assistance from the patron. However, in the traditional sort of D&D warlock pact, their might be an actual agreement made, and if the warlock doesn't continue to serve the patron according to that pact they might be more likely than a deity to make their life uncomfortable. They are unlikely to be able to actually strip you of your powers at all.