Here is my idea
Once a team is eliminated from getting the 6 seed or better. A tally starts, every quarter they win in the remaining games, they get one point, maybe give 2 or 3 points for a win.
At the end of the season, the team with the most points, gets highest odds to win the lottery.
Still helps bad teams because they will be eliminated early and have more chances to get points. At the same time, it gives them motivation to play better at the end of the season.
The point amount only matters for eventual non playoff teams. So a team may end up with some points but they make the playoffs… Those teams are not considered in lottery.
Even better: make rookies join as free agents so franchises have an incentive to be lucrativ to young talent.