1. You need to address the first issue,,,the check engine light and the egr and temp sensor problem.
When you have this issue resolved,,,then move to the next issue.
You need to perform repairs in a logical order,,,right now,,you are jumping all over the place.
Do not buy any more parts,,until you correctly check the components on your engine.
You will go broke,,before you resolve the problem.
You need to get a service manual for your car.
The service manual will show you something that is called a " Flow Chart ".
Professional mechanics use the Flow Chart,,,so they can find the problem quickly..and so they don't have to waste any money replacing parts that are working correctly.
You can get a service manual at the dealer,,an auto parts supply store,,,or at the reference desk in your local library.