  Galaxy clusters are one of the most powerful probes to study extensions of
General Relativity and the Standard Cosmological Model. Upcoming surveys like
the Vera Rubin Observatory's Legacy Survey of Space and Time are expected to
revolutionise the field, by enabling the analysis of cluster samples of
unprecedented size and quality. To reach this era of high-precision cluster
cosmology, the mitigation of sources of systematic error is crucial. A
particularly important challenge is bias in cluster mass measurements induced
by inaccurate photometric redshift estimates of source galaxies. This work
proposes a method to optimise the source sample selection in cluster weak
lensing analyses drawn from wide-field survey lensing catalogs to reduce the
bias on reconstructed cluster masses. We use a combinatorial optimisation
scheme and methods from variational inference to select galaxies in latent
space to produce a probabilistic galaxy source sample catalog for highly
accurate cluster mass estimation. We show that our method reduces the critical
surface mass density $\Sigma_{\rm crit}$ modelling bias on the 60-70% level,
while maintaining up to 90% of galaxies. We highlight that our methodology has
applications beyond cluster mass estimation as an approach to jointly combine
galaxy selection and model inference under sources of systematics.
