Refactor how ephemeral protection providers are created.