In cuff links and tie, seated in his mansion in Accra, Richard Nunekpeku, 34, wants to project what this new breed of agripreneur can achieve. Five years ago, he left a high-paying job as an international marketing manager for Samsung to raise fowl, cereals and vegetables through a cooperative, Anyako Farms.

It hasn’t been easy. His first year, he invested nearly $80,000 in planting maize — but without irrigation, a dry spell wiped out the crop. The harvest earned just $8,000.

Drawing on his corporate background, Mr. Nunekpeku started over, hiring researchers in soils and fertilizer, and investing in high-tech irrigation. This year his farm is on track to break even for the first time, he said.

A boom in technology that aims to increase productivity is helping make agriculture more modern and lucrative. The number of agricultural technology start-ups in Africa has grown significantly from 2016 to 2018, according to a report by Disrupt Africa, a technology news site.

For some young farmers, it is not enough just to lure their peers into the sector. Nana Adjoa A. Sifa, 31, who has a degree in psychology, wants to utterly change how farming is done.

After years of working to engage youth and women in farming, she became a farmer herself. And she uses no pesticides on her farm, Guzakuza, planting mutually beneficial vegetables on a single plot.

“I want to transform mind-sets, and Africa,” Ms. Sifa said, holding an organic carrot seedling. “If we fail, it means the industry has failed. It means we have failed many young people.”