Efficient and robust optimization of nuclear and electronic orbitals within the nuclear Hartree product representation | Synapse