It may not be as elegant as a trap, but I believe that the URLTrigger plugin will achieve what you are looking for. Listed in their use cases:
This plugin allows users to check whether new artifacts (such as binary files) have been deployed to a repository (managed, for example, by a repository manager such as Sonatype Nexus, JFrog Artifactory, Apache Archiva, etc.).
This allows you to check the date of the last change and check the content of the response for changes.
You will need to use the polling interval instead of relying on Artifactory to notify Jenkins through the hook, but in my experience, polling is relatively harmless even with a large number of polls at large intervals.
source share