Engine hits wall at 5k only in 3rd gear

It must have to do with engine load and RPMs both.
I'd take a guess at fuel delivery or the timing changing with different vacuum load.
Probably fuel.