Longest class 47 I can find is D1661/47077/47613/47840 which carried North Star from 1965 until preservation in 2007 (42 years). Still carries it.
Answering the Thor/City of Truro point above the op does state the same loco has to carry - so transferring around doesn't count.
Class47.co.uk is good for tracking what names were carried when and by which loco.
Answering the names moved around point the likes of City of London/Glasgow/Manchester etc must all have been carried by three + units/locos (LMS, Class 86/87, Pendolino) - must be a few examples?
Benbow, Vanguard, Hercules and Monarch were carried by class 42 Warships and Class 50s, Ramillies, Royal Oak, Temeraire, Tiger, Triumph were carried by class 43 Warships and 50s, whilst Superb was carried by class 43 warship D849, 50002 and now 68025.
Class 68s and 50s share the names Fearless, Achilles and Courageous.
Titan has been carried by D1665/47080/47612, 68009, an Irish Railways Midland Great Western Rlwy 0-6-0 No.133 Later Gt Sthn Rlwy No.587, LNWR 4-4-0 'Precursor' class No.7 Renumbered LMS No.5276, LNWR 2-2-2-0 Webb Dreadnought No.508 & GWR 4-4-0 Bulldog class No. 3336 (info from the Class 47 site linked above!)