Can an AlwaysOn Availability Group be used to mitigate downtime when there's replication syncing issues on the primary server?
In general, no, this is not going to work because the databases in the availability groups are read-only on the secondary.  If SQL Server somehow allowed other processes (the replication) to change data on the secondary, the database on the secondary would no longer be in sync with the primary, right?  And the way SQL Server AG synchronization (mirroring) works, it would have to be about completely rewritten to even think of supporting something like this.

However, if the subscriber is read-only, you could use a process similar to the following to accomplish what you want, but I do not recommend doing so as it is getting away from What It Is Designed To Do, and the longer you're in IT, the more you'll know why that is a problem.

Once the situation occurs where you need to resync:

Fail over to Server B
Remove the database(s) from the availability group that are part of the Server Z replication scheme
Bring the databases on Server A out of recovery and let your replication resync from Server Z
Once the data on Server A is in sync with Server Z, fail back to Server A
Drop the databases that are not in the availability group from Server B
Add the databases back into the availability group


Again, this would work only if Server B is used for read-only during this time.  Any changes made to the databases that were removed from the availability group while Server B is primary will be lost.