Can a module install a content type optionally or conditionally?
Don't install a module when its default configuration has unmet dependencies adds a config/optional folder, which silently ignores configuration that already exists.

config/optional can contain configuration that will only be installed if the required dependencies of those config entities are met, for example a default view that would only be installed if views is enabled and is not required for the module.