There was a lottery in 2004. It was just only the worst five teams and only for 1st overall then the worst team got 2nd and so on. Caps leap frogged us.
If they hadn’t we would have been ineligible for Sid.
Just to be pedantic, but technically in 2004, all the teams that missed the playoffs participated in the lottery, but the winner wasn't guaranteed to pick first - they just moved up four places. So the bottom five teams had a chance to pick first, but sometimes you'd see, for instance, the 14th overall team move to 10th place, instead.
The odds of winning were different for each team, such that the worst team had the best chance of winning the lottery, but it was some really small chance they had of outright winning it. That said, because if any team outside the bottom 5 won the lottery, the worst team still picked first overall, having the worst record meant the absolute best chance of picking first (and a guarantee of picking no worse than second overall).
This was actually the system in place for a very long time (aside from 2005, which had special rules due to there not being a preceding season, and the fact that it was the Crosby Draft), and they were used up to the McDavid draft. When it became obvious that Buffalo was blatantly tanking hard to get either McDavid or Eichel, they tried to change the rules last minute to the current system, but Buffalo raised enough of a stink about changing the rules out from under them after the fact, they delayed the "lottery for the top four picks" change to the next year. The rules have been tweaked a couple times since then, but this is what I remember off the top of my head...
(I am a fountain of useless trivia, apparently).