In this Letter, we provide three dimensional micromagnetic simulations describing the nonvolatile magnetization control of the critical current of a superconductor–proximity-modified superconductor–superconductor junction by initializing and training its magnetization state in an external magnetic field, the experimental demonstration of which had been reported earlier. In the present work, we develop a microscopic explanation for the observed general behavior of the reduced critical current Ic in states of high magnetization M. We are able to reproduce the non-monotonous behavior of Ic(M) and can clearly correlate the discrete jumps in Ic(M) with flips of single or few magnetic domains in granular cobalt. We show that both the three-dimensional modeling and the grain size distribution are important to replicate the experimental observations.