How can I evaluate the condition of used lithium ion batteries?
I had exact same problem before and I have simple solution for it, it's simple and cost effective but takes a lot of time.

I used one arduino uno and 16x2 lcd display and few power resistors,
Generally lithium batteries have maximum 4.2 V and can supply about 0.5-1A. You can use 5  1 ohm 1 watt resistors to discharge the battery and connect a n channel MOSFET for start&amp;stop the circuit.

Arduino's analog pin will read battery's voltage level and if it drop to 3.5 V or 3V , it'll stop the discharge. Energy stored in battery can be calculated by current*time and you can calculate current by voltage/5ohm .

It takes 4-8 hours to measure the battery . You can lower the resistors to make it faster but it'll damage the battery and faster you discharge, lower the capacity.

I have schematics in somewhere but if you want to use it, I can add schematics and code

Also you can measure the basic capacity by voltage levels , if fully charged battery's voltage is 4.2v . It's probably good condition but bellow 3.8V goes into trash .