Phase-field modeling offers a powerful tool for investigating the electrical control of the domain structure in ferroelectrics. However, its broad application is constrained by demanding computational requirements, limiting its utility in inverse design scenarios. Here, we introduce a machine-learning surrogate to accelerate 3D phase-field modeling of tip-induced electrical switching. By dynamically handling the boundary conditions, the surrogate achieves accurate reproduction of switching trajectories under various tip locations and applied voltages. With stable predictions throughout entire morphological evolution pathways and a relative error inferior to 10% compared to direct solvers, the model efficiently emulates intricate switching sequences. By successfully replicating the boundary conditions, the presented framework strides towards a holistic surrogate for the ferroelectric phase field. With up to 2500-fold speed-ups over classical methods, our approach opens the path for the tractable design of the domain structure and the resolution of realistic inverse problems.