There was something like this set up at STEELCON- it used 3.5mm jack connectors for each slot, and the blocks (which were different logic gates) simply shorted one or more of the ring/ring/sleeve to the tip to form a very simple block ID.
3.5mm jacks worked well, since they’re normally rated for a lot of insertions (see your headphone jack), don’t require plugging in a specific way up, and come in TRRS varieties (Tip-Ring-Ring-Sleeve) which have 4 electrical connections in them.
4 connections = 3 bits + 1 for ground.
3 bits is 7 ( 2^3-1 ) possible permutations, but we have to ignore permutation 000 since that would be “unplugged”, which gives six uniquely identifiable combinations left:
000 = Unplugged
The same colour be accomplish with 4 metal contacts, or pogo pins, but they may be harder to deal with. The great thing about 3.5mm plugs is they basically require no components but the plug itself and a bit of wire/solder. You then just need one micro:bit to read the state of the pegs- which admittedly would require 3 “read” pins plus one pin for every slot you want to read.