Car won't accelerate past 40mph

Could have Bad Gas depending on age.(Check that you have good fuel pressure)Change filter and fuel pump as needed.You’ve replaced a good number of things,I would continue, replace coolant tempSENSOR,Crnk Pos sensor,MAP sensor,TPSensor,and EGR valve.
Let us know how it turns out.