Chess Pains - S3-E18
Other mistake: When Frasier sets off the fire alarm Daphne comes running from her bedroom at the end of the hall across from Martin's room and Frasier's room. That is incorrect and impossible since Daphne's Room is on the other end of the condo and separated by the balcony. Given the condo layout, it is impossible for Daphne's bedroom to have a door across from Frasier's bedroom.
Answer: It equals the record of James Arness of "Gunsmoke" for the actor who's played the same part on TV NOT in a soap opera. If you include soaps there are two main contenders - William Roache, who's been playing Ken Barlow in "Coronation Street" in the UK since 1960. Don Hastings has been playing Robert Hughes in US soap "As the World Turns" since 1960 as well.