Easiest way to find matching li-ion cells (3.7V, 18650)
This is obviously a lot to produce but it's how we once solved the problem you've described...

I helped another engineer design and develop a cell matcher, which he went on to sell. This was 25 years ago with NiCd cells used for remote-control vehicles. Our system profiled cells using a constant-current discharger and an ADC in a data logger (actually a home computer back then). Cells were selected and matched by examining the discharge graph and key parameters for each cell. The latter were figures such as time to Vout dropping to something like 80%, time to fall from 80% to 20% and a few others.

The discharge circuit was simple enough: a current regulator to ground with an op-amp controlling it.







simulate this circuit &ndash; Schematic created using CircuitLab

Our discharger actually had about 5 x TIP31A connected in parallel to dissipate the heat.

The whole system of computer interface and discharger worked very well, he sold enough of them. The customers were RC enthusiasts who already had their own chargers.