MARASIA, Greece—In the dead of night, Yunuz Cagar and his wife Cansu gave their baby some herbal tea to help her sleep, donned backpacks and followed smugglers on a muddy path along the Evros river, evading fences and border guards until they reached Greece.

Mr. Cagar, a 29-year-old court clerk, was living a quiet life with his family in a provincial town near Istanbul until Turkey’s crackdown after a failed military coup in 2016 turned their world upside down. Judges, colleagues and friends were arrested. He lost his job...