The digitalRead method doesn't return a Boolean value. It returns an Integer.
Unlike Juraj wrote in the comment values of LOW and IGH are not an Enum. They actually are defined in Arduino.h as being simply Integer 0 for LOW and 1 for HIGH
#define HIGH 0x1
#define LOW 0x0
This means that you have to store results of digitalRead inside Integer variable.
int value = digitalRead(8);
It was designed that way to easily cast values between Integer and Boolean. By (very smart) design choice Integer value of 0 (LOW) will be cast to false and every other value (for example 1 or HIGH) will be cast to true.
The operator ! (Boolean NOT) can be used only with Boolean variables so the compiler needs to perform several "implicit casts". When it's smart enough it will assume you are know what you are doing and it will add the cast by itself. Unfortunately this is not happening for one of your boards and compiler throws an exception when evaluating:
!digitalRead(pin_enable_line)
So you can just write "explicit casts" so the compiler doesn't need to guess:
(int)!(bool)digitalRead(pin_enable_line)
This code smells bad but it will fix the issue. You cast Integer result to Boolean, then negate it and cast it back to Integer so it can be passed into digitalWrite method.