Hi Steven, a way to handle this would be with your delete behaviour:
Company 1 - * Engagement 1 - * File
If you have set up your delete behaviour to delete engagements when company is deleted, and delete file when engagement is deleted. Then a delete on the company entity would cascade and delete all the associated objects as well (all engagements and all files)
https://docs.mendix.com/refguide/configuring-a-domain-model/#delete-behavior
Does this help?