Some caveats on this:
Ideally, this would only happen if the module actually contains a custom type since it is pointless otherwise
It should probably use the --force option but that can take a bit of time to run, particularly if there are a lot of updates
It should only run on the simp environment and it should only run if we actually copy files into the environment. There is no reason to run it if we don't copy anything in
If possible, we could use incrond and/or systemd to trigger on file glob matches based on the main modulepath. This would be much cleaner than modifying the RPM stack and is future-proof against different methods for managing the system modules.