ISTANBUL — When the police banged on his door and took him away for questioning one dawn in November 2018, Yigit Aksakoglu assumed he would be home in time to catch his afternoon swim.

But after a 10-hour interrogation, he was hauled off to court and thrown into jail in solitary confinement for seven months on a charge that is among Turkey’s most heinous crimes, violently attempting to overthrow the government.

The Turkish representative for a Dutch charitable foundation specializing in programs for the social development of young children, Mr. Aksakoglu, 43, never expected to run into trouble with the law. Even when President Recep Tayyip Erdogan of Turkey began mass arrests after a failed coup in 2016, sweeping up many innocent academics, journalists and human rights activists, he never thought he would be caught up in it, too.

“I was picked accidentally,” Mr. Aksakoglu said in an interview at his office in central Istanbul. “And now they are unable to unpick me.”