How to realize a generic "countdown X days until task" Thing?

You might find this gives a starting point

I think for a daily countdown I would do decrement with rule, not expire.
But the design principle there of separating command from state you should find useful.

Obviously the counter Items would need persist/restore.