if this other device contains old data, this old data of course gets pulled from the rest of the devices.
Are you using push or pull or both? Earlier you said “‘clients’ … push their changes to the ‘server’”.
I know filters work for push replications (where the filter runs locally) but I don’t remember whether they work for P2P pull replication (where the filter has to run on the ‘server’ that’s being pulled from.) I’d have to look at the source, and I don’t have that handy right now. (Also you haven’t said what platform this is for.)
In general if you want to prevent a specific document from being added to the database by a pull, you can add a db validation function that will reject it.
Also, why not have all the devices use the same criteria to purge old documents? That way they won’t end up with different sets of docs (or if they do, it’ll only be for a brief interval.)