I think it's pretty simple. People who die without having committed sin end up in heaven. Their circumstances may differ a lot and that is tough luck. Being born in South America in 2000 BC didn't help much. Regarding small children, I don't think that parents' perceptions of their children as sinners necessarily reflects the nature nor the heart intent of the child. The four year old of a couple that I know does and says a lot of strange things but I don't perceive him as committing sin or being a sinner. God is the judge of all of that, regardless.