When a Case is set to Closed we would like all un-Completed Activities on the Case to have their Status changed (eg to Cancelled
I would hook on https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_post/ to find cases being closed then do the work from there. I would follow the civicrm_option_value grouping field to determine if a status represents closed. 

This seems like an opportunity for a nice small single purpose extension. Maybe 3-4h to develop and publish.