I would say, the difference between когда-то and когда-нибудь is somewhat similar to the difference between definite and indefinite article. "Когда-нибудь" means "at some time" or "some day", "когда-то" means "at certain time" or "one day". Compare:
Если много играть в эту лотерею, то когда-нибудь выиграешь.
If you play this lottery much, you will win some day.
This means that one can hope to win in this lottery only statistically, without solid knowledge of inevitable win.
Если много играть в эту лотерею, то когда-то выиграешь.
If you play this lottery much, you will win one day.
This means, one can be sure that the win is inevitable not only statistically but the win is pre-determined (for example because the win is guaranteed to all players before all the tickets are spent).
Наш город когда-нибудь станет крупным промышленным центром.
Some day our city will become a big industrial center.
One can reasonably hope that the city will become an industrial center in uncertain future.
Наш город когда-то станет крупным промышленным центром.
One day our city will become a big industrial center.
The city will become the industrial center for sure, this is in the plan, and the date even may be known.
Когда-нибудь я стану руководителем завода.
Some day I will become a factory manager.
This can be said by a successful employee.
Когда-то я стану руководителем завода.
One day I will become a factory manager.
This can be said by a heir to an industry tycoon.
Когда-нибудь мы все умрём.
Some day we all will die.
This may be said by a healthy person living in natural conditions.
Когда-то мы все умрём.
One day we all will die.
This may be said by a person anticipating a disaster or speaking about a terminally ill group of people.
It is of no surprise that когда-нибудь is more often used for the future (like "some day"), while когда-то is more often used for the past (like "one day", "once"). This is because one can be more certain about events in the past than about events in the future.
Speaking with mathematical language, one can say that "когда-нибудь" means
and "когда-то" means
where p(t) is the probability distribution of the event, t0 is the present moment and t1 is some moment in the future.