Hmmm, based on the codes and the behaviour, I would suspect a blocked exhaust, most likely a blocked cat.
At 5k rpm or so, it won't "jump" a tooth or 2 on the cams, it will let go in a very impressive manner!
Thats good to know.. Phew!
With regards to the EGR Blanking off post above.. What does that entail?
Blocked exhaust is also a very strong possibility. To blank of the EGR, you need to remove it from the manifold. The hole that is then exposed is then blocked by means of a thin piece of metal - the side of a coke can etc. - and the valve is then put back on. This will not clear the fault, but it will stop the exhaust gas being drawn into the engine when it should not.
As others have said (as as I should have ) check all the wiring connectors are pushed home etc.
I hope that this explains it better - if not post again. I will try and put some pictures up later of the EGR valve so you know what you are looking for at least.
As promised, here we go with the pics of the EGR valve. This is from my 1998 mini facelift.
Firstly, the EGR valve itself which is on the drivers side of the engine (left hand cylinder bank):
Next, is the connection between the exhaust manifold and the base of the EGR valve:
and this is where the top of the valve mounts on the Plenum (the silver top of the engine with ECOTEC written on it):
I guess that either the base of the valve, the shiny silver part in the first pic where it meets the older looking metal, or at the plenum would be the best places to blank it off if you choose to take this route.
I will be interested to see how you get on with resolving this issue.
Hope this helps in some way. Good Luck
****EDIT****
Edited to correct spelling of best and include what I was going to say about blanking at either the base or the plenum.