In this lecture, we study optimal control problems for an Allen--Cahn equation with nonlinear dynamic boundary condition involving the Laplace--Beltrami operator. The nonlinearities both in the bulk and on the boundary are assumed to be of double obstacle type, i.e., they involve the subdifferential of the indicator function of the interval [-1,+1]. We address both the cases of distributed and boundary controls. Control problems involving nonlinearities of double obstacle type belong to the class of "MPEC" problems. It is a well-established fact that for such problems the standard constraint qualifications are violated, so that the existence of Lagrange multipliers cannot be inferred from the standard theory. In this lecture, we take a new road of approach: in a recent paper by Colli and Sprekels corresponding control problems involving logarithmic nonlinearities in place of the indicator function were studied, and results concerning existence and first-order necessary and second-order sufficient optimality conditions were shown. Performing a "deep quench" approximation (i.e., approximating the indicator function by logarithmic nonlinearities), we are able to establish both the existence of optimal controls and first-order necessary optimality conditions. This is joint work with P. Colli (Pavia) and M. H. Farshbaf-Shaker (WIAS Berlin).