Yes. I spent the whole day, yesterday, checking the game files and mods that maybe do something similar. The closest I got was with Timed Actions, but I only managed to disable item transfer at all, without an actual condition. lol
I think it's related to the inventory portion of the Timed Action system, because there is pieces that define source and destination containers, the player and the world, but I'm not sure how to write the correct function to achieve what I need.