  Magneto-optical trapping (MOT) is a key technique on the route towards
ultracold molecular ensembles. However, the realization and optimization of
magneto-optical traps with their wide parameter space is particularly
difficult. Here, we present a very general method for the optimization of
molecular magneto-optical trap operation by means of Bayesian optimization
(BO). As an example for a possible application, we consider the optimization of
a calcium fluoride (CaF) MOT for maximum capture velocity. We find that both
the $X^2\Sigma^+\,$ to $A^2\Pi_{1/2}\,$ and the $X^2\Sigma^+\,$ to
$B^2\Sigma^+\,$ transition to allow for capture velocities larger than $20$ m/s
with $24$ m/s and $23$ m/s respectively at a total laser power of $200$ mW. In
our simulation, the optimized capture velocity depends logarithmically on the
beam power within the simulated power range of $25$ to $400$ mW. Applied to
heavy molecules such as BaH and BaF with their low capture velocity MOTs it
might offer a route to far more robust magneto-optical trapping.
