Working on a CLI tool called xpire which can add expiry dates to filesystem structures: https://github.com/benibr/xpire
Idea is to use filesystem specific structures (eg. snapshots) if possible to prevent long treewalks for searching and store the dates in the filesystem itself not a seperate database.
It's written in go and currently supports btrfs snapshots and zfs datasets.