A recent preprint paper examines the minimum number of people required to maintain a feasible settlement on Mars while accounting for psychological and behavioral factors, specifically in emergency situations. This study was conducted by a team of data scientists from George Mason University and holds the potential to help researchers better understand the appropriate conditions …
Considering humanity was knocked down to about 1200 people about 800,000 years ago and we survived without any technology to speak of, let alone genetic testing that would help determine maximum diversity, I’d say you might be surprised.
That assumes that everyone will be willing to have children with just about anyone, regardless of their personal opinion of them, and regardless of whether or not they even want children to begin with. You can’t selectively breed humans without massive human rights violations.