PCF8574AN configured as output for relay

Forget about accessing the pins directly and just go through there two functions:-

byte outputData = 0xff;
void setOutptr(byte bitToChange){
    Wire.beginTransmission(PCF2_output);
    outputData |= 1<< bitToChange;
  Wire.write(outputData);                      // set the bit and leave the others alone
  Wire.endTransmission();
}

void clearOutptr(byte bitToChange){
    Wire.beginTransmission(PCF2_output);
    outputData &= ~(1<< bitToChange);
  Wire.write(outputData);                      //  clear the bit and leave the others alone
  Wire.endTransmission();
}

So when you want to turn on say relay 4, that is the relay on bit 4 you just use

setOutput(4);

when you want to turn it off then use

 clearOutput(4);

As long as you use those two calls nothing else will change only the one bit that you specify.