If you can guarantee the “uniqueness” of each page’s title, I would first run the entire import, and then loop over the newly inserted pages & set their parents by cross referencing the CSV.
If you can guarantee the “uniqueness” of each page’s title, I would first run the entire import, and then loop over the newly inserted pages & set their parents by cross referencing the CSV.