(Created on Aug 20, 2023 by @iljakuklic)
Bitcoin has a rolling bloom filter for recently rejected transactions. See PeerManagerImpl::m_recent_rejects and its uses. It is used to more aggressively prune transactions coming into orphan pool if it looks like one of the parents has been already rejected by the mempool in the recent past. Consider doing something similar.