I think there is a huge element of luck - but I don't think you can be as dismissive as to say it is 'just' luck.
I have two boys, one was a chunky 75%iler, the other a much more 'dainty' 25%iler. One much calmer, one much feistier and prone to overtiredness. Both EBF. More routine oriented with DS1, a routine but rather more flexible with DS2 because I had to be. Both slept through the night (late feed at 11 then through the night till 7am) from about 8/9 weeks. Both continue to be good sleepers, barring occasional illness, periods of separation anxiety as toddlers etc.
Based on my own experience I honestly believe that a massive amount has to be to do with the baby themselves - their nature, their individual sleep needs (some babies simply need more sleep than others), their ability to learn to settle themselves and also to resettle when they stir during the night (some babies seem to learn that skill very quickly and easily, for others it takes months if not years). Both mine seemed to (a) need quite a lot of sleep and (b) learn how to settle and resettle with minimum guidance / stress. I don't think the EBF v EFF thing has a lot to do with it, to be honest.
But I don't believe it's ALL nature; I suspect that the habits some people get into (either deliberately, accidentally or through sheer desperation) can - sometimes - impact on their babies' ability to sleep. i.e. if babies become dependent for whatever reason on rocking/feeding/dummy/cosleeping this may (not necessarily, but may) impact on their ability to learn to self-settle and resettle. There are enough threads pleading for help in getting poor sleepers to sleep better, where different techniques are suggested and subsequently do make a real difference, to imply that what parents do can have an impact.
So I do agree that my two were born good sleepers, but I also think that I could have buggered that up to a certain extent had I parented them differently. I do think that having an element of routine, not letting a baby get too overtired, keeping night-times dark and quiet, moving them to their own rooms once they got to the point of being disturbed by us during the night etc made some difference, but I certainly wouldn't claim absolute credit for having 'good' sleepers, because so much of it is due to the individual natures of my children themselves.
I am due DC3 next week and cheerfully admit that I am due an absolute shocker of a sleeper this time around