In \Drupal\Core\Recipe\ConfigConfigurator::__construct() we compare configuration. Maybe there is something in core we use already. Or maybe there is similar code embedded somewhere else and we could make it generic and shared.
Semi related, the current logic removes _core in active config, but not in default config. I can never remember when you're supposed to keep _core vs not.