Hi.. I had the same problem.. I flashed the T-Display S3 using a Win10 and the espressif flash download tool (with Thonny always display the invalid header you said). The first issue (in the espressif tool) is to check the location of the firmware file and the memory location are in green. Second I had to flash the T-Display S3 in safe mode (Win10), because at half of the load it disconnected the device. Third put the TDisplay S3 in download mode pressing at the same time the reset and boot buttons, then release first the reset button, next the boot button, finally begin the flash. After that everything was OK. I followed the instructions of this video.. it is in spanish.. but you can switch the subtitles on. https://www.youtube.com/watch?v=bxXz-tmNuWU&t=624s