For some time I've been working on a set of Azure AD B2C Release tasks for Azure DevOps.
These tasks are tailored to automate the creation and maintenance of B2C directory components like: applications, application secrets, keys, user extension attributes, and policies. You can also make sure that IEF steps are executed on any tenant without having to follow the steps on this article: https://docs.microsoft.com/en-us/azure/active-directory-b2c/custom-policy-get-started. Application IDs are provided as outputs to be replaced in custom policies deployments in a subsequent task.
They can be executed multiple times on a tenant if the desire is to ensure the components deployed match the structure of your custom policies. The tasks will update the components without the need to destroy what has already been configured.
Custom editors are part of the extension to facilitate entering the configuration.