How can i practice eugenics without getting caught? [duplicate]

Place blocks in a checkerboard pattern, two blocks high. Or since you already have a crowd, dig out block in a checkerboard, two blocks deep. If you are careful you can walk over them without falling in, but all villagers will quickly become trapped in 1x1 pits. Then for each pit, check if there are any villagers you want to keep. If not, pour a lava bucket in the pit for 2 seconds. Since the villagers only take "environmental" damage, this will not provoke any golems.