The next arguments to write_flash are one or more pairs of offset (address) and file name. Consult your SDK documentation to determine the files to flash at which offsets.
Numeric values passed to write_flash (and other commands) can be specified either in hex (ie 0x1000), or in decimal (ie 4096).
So the 0x0 argument in the command is the address at which to flash the .bin file specified by the following argument.
Even though it is interesting to learn how to use esptool directly, there is a good chance the same underlying problem that is causing the uploads via PlatformIO to fail will also cause the uploads when using esptool directly to fail.
So if you are spending a lot of energy to try to figure out how to use esptool solely in hopes it will fix your upload problem, I think that energy would be better spent in finding and fixing the actual cause of the failed uploads.
I saw from your other topic that you also use Arduino IDE. Does the upload also fail if you attempt to upload a sketch to your WEMOS D1 Mini using Arduino IDE?
OK, then my hypothesis that there is some underlying problem was wrong.
You can get Arduino IDE to generate the working command for you:
Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
The "Preferences" dialog will open.
Uncheck the box next to Show verbose output during: ☑ compilation in the "Preferences" dialog.
Check the box next to Show verbose output during: ☐ upload.
Click the "OK" button.
Use Arduino IDE to upload any sketch to your WEMOS D1 Mini as you did before.
Wait for the upload to finish.
Now examine the contents of the black "Output" panel at the bottom of the Arduino IDE window. There you will see a command that looks something like the one I shared in post #3. You can copy that command and run it from the command line, as well as making adjustments to the command as you like.
That is interesting. Unfortunately I don't have any experience with PlatformIO so I can't be of much help here. But other forum helpers here use it so they can probably provide you with assistance for any PlatformIO-specific problems you might have.