Thanks @LEGGO! After a bit more digging, I found [this post] from @Marie (Adding subtasks via csv - #31 by Marie), which explains it.
The reason it wasn’t automatic was because of the first conflict you mention, i.e., I’d attempted to specify the project as the parent task of my top-level tasks. Anyway, problem solved, thanks!