Solder the wires to the coil base first (it probably have to be done anyway). Then use a jig to connect the megger to different pairs. Add safety switches to prevent disconnecting while powered.
If you don't use a coil base, insert the loose wires in insulation displacing connectors similar to flat cable connectors. Look at Molex, AMP ...
There should be some test equipment available if your volume is high.
__________________
Experienced is earned, common sense is taught, both are rare essentials of life.
Please search "Electrom Instruments" and "Baker Electric", both of these companies are located in Colorado. The basic "surge test set" can be found at various voltages with ramping to 3kV, 6kV and 12kV DC and specials above those voltages for basic hipot testing, then to really do turn-to-turn testing you need a surge tester (which can test and store a ringing waveform response to an applied spike voltage) which can compare coils that should be identical and identify shorted turns, etc. These surge testers are typicly found in electric motor repair shops.
depending upon how many coils you are testing, there are computerized automatic test sets, for testing inductors, electric motor windings, ... available from Baker Electric and Electrom Instruments and International Electromagnetics
For inductors it can require adding an iron bar to create a field. Years ago a "Sunshine" test set was available. A modern version may be available from "IEM" "International Electromagnetics" on the north side of Chicago. They also have turns counters for inductors, and shorted turns detectors.
There is another company "Monolithic Industries" that builds test sets (digital micro-ohm-meter with over/under alarm and material compensator, and other test sets for inductors and electric motor windings, such as polarity indicators, ...
If you are testing transformers and CT's then look at "Raytech" also.
__________________
"I believe we are masters of our lives - we hold all the cards and it is up to us to use them right." Vesna Vulova - survived 33,000ft fall