Assumes last line never has a pattern like "(nnnnnn)", where n are some number of digits. Pattern matches one or more (+) digits between parentheses but not the parentheses themselves (-P switch enables the use of Perl look-behind/look-ahead).
If the second to the last line is really fixed to be
4 ETW000 End of Transport (0000)
where only the number inside the () varies, and this line never occurs elsewhere in the files, then you could simplify and use:
grep -oP '(?<=4 ETW000 End of Transport \()[[:digit:]]+(?=\))' infile