Quasiparticle dynamics and phase locking in a S-I-S multilayer Josephson junction