You can do this with the toot tool:
https://toot.bezdomni.net/introduction.html
Author your complete thread in one .sh file and post it with all media etc. You can reply as many times as you want.
#!/bin/bash
toot post "toot 1" > toot_id.txt -m path/to/image.png -d "My image"
id=$(grep -oE '[0-9]+$' toot_id.txt) && echo $id
toot post --reply-to $id "reply to toot 1" -v 'unlisted' -m path/to/image2.png -d "My 2nd image"
toot post --reply-to $id "second reply to toot 1" -v 'unlisted'