As above. Really unlikely to be the engine in fact 90% sure it probably isn't as you'd definitely know if that was going to give up and it would be chucking out blue/black smoke and stinking of fuel as well.
Most likely to be failed lambda sensor or possibly knackered cat but definitely not something like a duff engine!