There are 1800 medallions for all of SF ( https://www.sfmta.com/services/taxi-industry/medallions/meda... )
At 250k, buying them back would cost $450 million.
The city could tax the new cabbies on a percentage of each fare, while buying back medallions over the next few years.