I'm sorry about the experiences so far with this dryer and I would disagree with what the 2nd customer service representative told you but I would also disagree with the part the 1st representative gave you.
They're not technicians and the idea is to try making the best guess as to what part you might need based on the problem you have so the technician doesn't have to order a part and create a 2nd trip for him and a longer wait for you. In this case it didn't work for you but the F40 code is a difficult problem to pin down without actually making voltage checks with a meter.
If you have a volt/ohm meter and are comfortable using it then there are a couple of things you can check yourself to try and pin this problem down. The image below contains information on accessing the two control boards in the console and a wiring diagram that may be helpful to you.
The F40 error is a communication error which means the main control W10111616 is not communicating with the motor control part number 8544799. Most likely neither control is the problem but since the main control was replaced we know it's not the problem.
The key to diagnosing this problem is to check voltage to the motor control. There is a black and white wire going to L1 and neutral. Refer to the wiring diagram for an image of this. If there is 120 volts to the control and the blower motor is not running then the 8544799 motor control is most likely at fault.
It is more likely you will not read voltage there. Use extreme caution checking live voltage and only do so if you're comfortable and confident using a volt/ohm meter.
If there is no voltage to the motor control and the main motor doesn't run the thermal fuse can be at fault or the main control which was replaced and didn't help.
From the description you give I believe the main motor is running when you get the F40 code so the thermal fuse and main control are most likely okay.
If there is no voltage to the motor control then the problem can be a
that may be open preventing voltage from getting to the motor control.
This part is not the thermal fuse and is not listed in the parts diagram or even shown on the wiring diagram. The fuse link is most likely the cause of your troubles. If the inline fuse link is open you will have to replace the entire wire harness. The inline fuse link is not available as a separate part.
I would recommend a technician replace the harness.
I'm not clear on if the w10111616 main control was replaced by you or a technician.
The best move now is to check voltage to the motor control while trying to run the dryer. Use extreme caution. Do this if your comfortable with your do-it-yourself abilities and submit another question with what you find.
If this is not under warranty and you feel like you need to install the harness yourself we can send you additional images on how to tear down the dryer further.
I hope this information gives you a better idea of what might cause this F40 code. Submit another question with any additional details for further assistance.