Partial-measurement–induced entanglement dynamics in a Josephson-junction system