In Jenkins Pipelines one can use shared libraries. With them a additional directory is created:
Additional SharedLibrary-Folder: /var/lib/jenkins/workspace/job-id@tmp
Seems as if there the shared library sources are stored in case one want s to rerun the build.
In order to completely wipe out old build data, a option to delete this @tmp folder could be introduced.