https://youtu.be/WanGt1G6ScA?t=92 (from that video, at a timepoint which shows a young a baby crawling over a glass surface with a drop beneath it, with no sign of discomfort).
I'd say this proves the point completely. It shows that babies aren't scared of heights, and they don't acquire the fear from experience. Instead it seems likely it is that they either develop a mental model of how the world works, or they learn from watching other's behavior.
Or the mechanism is developed during a "critical period" once depth perception has developed. It isn't necessarily totally learned behavior.
Not sure what to think about it.