Load balancer failover

I am running a MK1200 router as a load balancer.
I am not running PPPoE on the router.
I need to fail lines when the link or authentication fails
I am using PCC

The question is:
Will this script work with out crashing the PCC?
Will the PCC connection marks still be distributed equally between the remaining working wan links??

For simplicity I am only showing one interface script
The Scheduled script (runs every 30s)

:global strIPAddress 8.8.8.8;
#Set the Global verables for each wan port
:global booWAN01;
:if ([:typeof $booWAN01] = "nothing") do={
:set booWAN01 TRUE
}

:if ([/ping interface=WAN01 $strIPAddress count=5] = 0) do={
  :if ($booWAN01 = "TRUE") do={
    :set booWAN01 FALSE
    /system script run R1-disable
    :log info "WAN01 Line Down"
  }
} else={
  :if ($booWAN01 = "FALSE") do={
    :set booWAN01 TRUE 
    /system script run R1-enable
    :log info "WAN01 Line Up"
  }
}

R1-disable (disable connection marks script)

/ip firewall mangle disable [find new-connection-mark=WAN01_conn];
:log warning "Connection WAN01 down";

R1-enable (enable connection marks script)

/ip firewall mangle enable  [find new-connection-mark=WAN01_conn];
:log warning "Connection WAN01 up";

The lines of code it disables/enables in the firewall

add action=mark-connection chain=prerouting comment="CM for WAN01" disabled=no \
    in-interface=OfficeSwitch new-connection-mark=WAN01_conn passthrough=yes \
    per-connection-classifier=both-addresses:4/0

add action=mark-connection chain=output comment="CM for WAN01 - output" \
    connection-mark=no-mark disabled=no new-connection-mark=WAN01_conn passthrough=\
    yes per-connection-classifier=both-addresses:4/0

add action=mark-connection chain=input comment="CM input WAN01" \
    connection-mark=no-mark disabled=no in-interface=WAN01 \
    new-connection-mark=WAN01_conn passthrough=yes