Actual policy is for dealer to tear down engine and send Ford pix. They also send Ford all the data from Your ECM. Ford can tell both how many times your ECM has been flashed, and also how many times the car has been started and stopped since your last flash. Since dealers report any ECM flashes they do, Ford can tell how many unauthorized ECM flashes have been done. IF... Ford declines your warranty claim, all of the costs to tear down and repair will be your responsibility, and at a price you will need to negotiate with your dealer's service department.
So.. if you think you broke something expensive, it may be better to go to a non-Ford shop and find used parts. Once torn down, it's pretty hard to move your car elsewhere, especially if they have pulled the engine/transmission, which comes out the bottom. There are technical bulletins on this if you wish to see Ford's policy in writing.