We are using an installed package with requires the creation of a catchall organisation, and for the id of that organisation to be added to custom settings. If that's not done then none of the contacts are copied on a partial refresh. Is it possible to create that organisation and change the settings before the refresh runs?
The sandbox refresh mechanism creates a new org, optionally copies some or all data without running triggers, workflow rules, or processes, then optionally runs a SandboxPostCopy script. If you want to create or update data, this is the interface you would use. I'm not sure exactly what behavior you're seeing versus what you expect, but during the copy process, the SandboxPostCopy interface is the earliest opportunity you have to do anything with your sandbox, which will occur after everything else has happened but before you get to use the sandbox for the first time.