In situ versus ex situ drivers of galaxy quenching: critical black hole mass and main sequence universality in the FLAMINGO simulation