Richard.
After 140000 miles the engine should be OK if it has been driven normally, but if it has been thrashed over the moors by a heavy footed driver the outlook is not so good. Your description of the symptoms (smoke, juddering, lack of turbo boost,) and evidence of neglect (blocked oil & air filters and oil leaks) suggests it has been poorly maintained. Whether that means the engine is clapped out or just in need of much work I cannot say.
The fault codes can be misleading and need careful interpretation because one fault can cause problems elsewhere. For example an inlet air leak can cause EGR valve blockages, but it is the EGR fault that is reported and so owners keep cleaning the valve without realising that the real problem is a split inlet hose.
I suggest you get the engine tested by an independent Audi mechanic before you invest much more time and money in the car.