I was a flight attendant with TWA, so take this as what it is: advice from 20+ years ago.
If all the overhead bins are full they will gate check your bag; tag it, send it down the external stairs of the jetway, and it will go in the belly with the other checked luggage.
If their “carry on” does not meet the size restrictions they absolutely will gate check it at cost. That’s their fault not listening or reading bag size restrictions orbwillfully ignoring them in hopes of forcing an oversize bag into the overhead.