Aha!
I imported the data explorer plugin and had a look at the discourse database. I found that the import_id for the parent message was present in the topic_custom_field and post_custom_field tables. Also, the message did exist.
But, it had been deleted. So, I guess, I was getting the error “parent message does not exist” because the import was looking in the discourse database rather than in index.db. It would’ve been good to get an error message saying the post had been deleted.
Anyway, I think this happened as, during an early test, I had deleted the first(small) batch of imported posts. I thought I had restored to before that point, but clearly not.
The good thing is that this is only applicable to my test server and I shouldn’t have the problem on the import on the live server.
Thanks for the pointers.