under what circumstances would I lose money investing in this
The situation,
"Everyone agrees" that "in the long term" (let's say more than 40 years but we'll come back to this issue) a broad basket of stocks does well.
It could be that "everyone" is wrong. It could be that we have been in a very long cycle (200 years) where (1) was true, and, it could be that ... (1) is ending, say, next Tuesday afternoon. So for the next 200 years "everyone" will say "stocks don't really go anywhere long term". {It's actually trivial to think of completely reasonable rationales why that could happen: stocks only mattered in the Western-world sphere of history which is long gone; something to do with technology; vastly increasing lifespans; dropping birthrate .. who knows.}
More on (2), note there are plenty of major markets that are a dumpster fire - just look at a long-term (50 yrs) chart of the Japanese stock markets. And have fear.
Regarding the "long-term" thing in (1). what people really mean by that is: if there are dips, the dips only last for 10 years or so! and then they come right back up! Whoo! That's fine. But if you reach retirement in one of those dips .. you're screwed. "It will be right back up, sometime after I'm dead" is not good.
Another possibility is that the value falls and never goes back up. But in this scenario, surely we're talking about world-ending cataclysm?
Unfortunately no for two reasons. (A) There's the point 4 factor. It might come back up - when you're long dead. (B) There's the point 2 factor. It is completely conceivable that in say 2040, everyone is saying "Wow it's so obvious the US markets disappeared since China obviously utterly crushed the US [or, some other reason we do not today guess]". The usual Cautionary Tale on this is the Nifty Fifty, which were a group of stocks "everyone" thought you could invest in safely "forever"; they're basically all now bankrupt.
Are there other risks which I haven't understood?
Yes, timing is the big thing in investing/trading. The usual Cautionary Tale is Apple stock, which is the single biggest dog ever in 500 years of investing history. (See graph https://money.stackexchange.com/a/127868/41786 ), many people people literally died waiting for it to explode, their last thought being "I'm sure Apple will explode! one of these days. They have such fantastic ads!" Of course, if you happened to buy it the day before it exploded, you conveniently forget all those died-waiting people, and you think you're clever. Like comedy, trading is all in the timing. The risk you're not thinking of is timing, it can get you.
Are there other risks which I haven't understood?
Yes, margin. Investing is mainly about margin (since it's a multiplier) and secondarily about whether the thing goes up or down such-and-such percentage. Margin is exceptionally important/dangerous because
A) If you don't use margin you may merely only get gains somewhat like inflation. If you spend 50 yrs of your life achieving "very little" - you're screwed.
B) If you do use margin and pick the wrong direction, you get really, really screwed.
It's tough.