since you have a cas and therefore over 150k of devices, you should contact ms support directly. they will help you work thru you problems.
SCCM Database replications between CAS and primary site

Dears,
I have an SCCM hierarchy consisting of two sites one central administration site (CAS)and another primary site (P2D,) the database for the CAS was on a remote standalone SQL server, and the primary SQL cluster.
Then We migrated the database for the Central Administration Site (CAS) to be hosted on SQL Always on availability group. And the actions have been done successfully without any issues.
After that, the SQL replication stopped between the Central administration site (CAS) & the primary site (P2D), and the two servers entered read-only mode on their consoles.
After some troubleshooting, we discovered that the SQL servers and SQL service Broker didn’t change on the primary Database however they changed and updated on the database of the central administration site.
It will be great if you can support me to fix this issue and enable the SQL replication between the two sites.
Thank you.