@lyh2o just thinking about this I wonder, assuming you have this in the office close to the computer that is programming it, if you could enable some debugging and post the trace here.
The debugging most useful is
so depending on how you build, but if platformIO it would be on a separate line
Then after downloading it, to open a terminal and capture the output and wait for it to connect to the internet. Then it would be to post that capture here.