This code can be set by incorrect resistance in the wiring harness between the EGR temp sensor and the ECM. Try using an ohmmeter to check the harness for open circuits, excessive resistance, or a short to ground.
The easiest way to check the harness is to connect a scan tool that is capable of displaying live engine data, and checking to see what the EGR temp sensor reading on the scan tool is, and then comparing it to actual EGR temp measured at the sensor location. Then, checking to make sure that the temp reading changes when the EGR is commanded open is the next step.
The customer has already stated that he replaced the EGR valve, and that it has been tested and is operational. he has also stated that when the valve is manually opened the engine idle drops to the pointnwhere the engine stalls, indicating relatively normal EGR flow is present.
I just posted the information about the EGR temp sensor harness being the likely cause here, and the customer state the ECM has already been replaced.
How are you making out with your P0402 problem?