  We develop a Maximum Likelihood estimator (MLE) to measure the masses of
galaxy clusters through the impact of gravitational lensing on the temperature
and polarization anisotropies of the cosmic microwave background (CMB). We show
that, at low noise levels in temperature, this optimal estimator outperforms
the standard quadratic estimator by a factor of two. For polarization, we show
that the Stokes Q/U maps can be used instead of the traditional E- and B-mode
maps without losing information. We test and quantify the bias in the recovered
lensing mass for a comprehensive list of potential systematic errors. Using
realistic simulations, we examine the cluster mass uncertainties from
CMB-cluster lensing as a function of an experiment's beam size and noise level.
We predict the cluster mass uncertainties will be 3 - 6% for SPT-3G, AdvACT,
and Simons Array experiments with 10,000 clusters and less than 1% for the
CMB-S4 experiment with a sample containing 100,000 clusters. The mass
constraints from CMB polarization are very sensitive to the experimental beam
size and map noise level: for a factor of three reduction in either the beam
size or noise level, the lensing signal-to-noise improves by roughly a factor
of two.
