KYIV, Ukraine—Europe’s largest wave of prisoner exchanges since the wake of World War II was set in motion when a Ukrainian soldier reached into the pocket of a dead Russian officer and found a phone. The device landed in the hands of Brig. Gen. Dmytro Usov, a deputy to the head of Ukraine’s HUR military intelligence service, which had just lost two of its men in battles northwest of Kyiv. Russia’s invasion of Ukraine was only three weeks old, and the phone presented a way to retrieve their remains. Usov, a career intelligence officer with a trim gray-streaked beard, scrolled...