Isn't this based on a Rudyard Kipling short story too?
When I started watching this (excellent) film I immediately thought of a Rudyard Kipling short story - from approximately 1890 - in which a man finds himself trapped in a small community contained within a sand pit. At first he doesn't realise he is trapped but finds it impossible to climb out due to the nature of the sandy slopes.
I'm surprised this story is not mentioned anywhere in connection with either the film or Kobo Abe's novel. However, I can't remember the title of Kipling's story (it is in the collection 'The Mark of the Beast and Other Fantastical Tales') Anyone else know it?