How to do an unattended import of profiles to BC 14?

In BC 14.x we have the ability to import/export roles/profiles via the client, including the extra customization we have applied to the roles.

But I cannot find a way to do this unattended via our deployment pipelines.

I have looked for either a Powershell CmdLet or automation API which can do the task, but not yet found any way to do it.

We would have preferred to use the "modern" profile and pagecustomization objects, but the later is having an issue with BC14, if the page also have an event subscriber.