Convincing European governments to invest in Indonesian infrastructure has likely been at the top of President Joko Widodo's mind as he tours the region this week, but his counterparts may have a more pressing concern.

"The worry, of course, is terrorism," said Colin Chapman, founder and editor-in-chief at think-tank Australian and ASEAN Strategies.

Europe is aware of the potential Southeast Asia's largest economy offers in terms of increased foreign direct investment and trade but counterterrorism could overshadow discussions Widodo holds in Germany, England, Belgium, and the Netherlands, Chapman said.

The 54-year old leader, commonly known as Jokowi, is in Europe from April 18-22, and met with German President Joachim Gauck on Wednesday.

From Paris to San Bernardino to Brussels, a string of global terror attacks in recent months have shaken governments, fueling a renewed focus on intelligence sharing as a terror prevention tool. Europe, especially, is on high alert due to the huge influx of refugees and migrants entering its borders from war-torn regions including Syria and Iraq.

Indonesia, home to the world's largest Muslim population, is no stranger to extremist violence and foreign companies operating in the country have long factored security into their decisions. National police recently stepped up a crackdown on extremists following bomb attacks and shootings in Jakarta in January.

Richard Graham, a U.K. MP as well as trade envoy to Indonesia, said the two nations shared a strong interest in counter-terrorism.

Stefan Wermuth | WPA Pool | Getty Images

Speaker of the House of Commons John Bercow (R) applauds Indonesia's President Joko Widodo, who spoke to parliamentarians at the Palace of Westminster on April 19, 2016 in London.

"We could benefit from hearing more about Indonesia's culture of unity through diversity," he said. "At the same time, we can share technology and soft skills to add to Indonesian police training."

The U.K. may be interested in providing Indonesia with high-tech equipment that could enable officials to better track peoples' activity on water, Graham added. The number of islands estimated in the Indonesian archipelago ranges from 17,500 to 18,300, making surveillance of armed groups especially tricky.

Moreover, the early release of a known terrorist involved in the 2002 Bali bombings could invite questions from European officials, Chapman noted. Last week, Harry Kuncoro, the cellmate and personal assistant of fundamentalist cleric Abu Bakar Bashir, was released from prison two years early for good behavior.

"Jokowi will be asked lots of questions as to what's going to happen with the other 50 terrorists who are all due to be released in a year," Chapman said.

Some critics say Indonesian agencies lack the capacity to adequately monitor high-risk offenders like Kuncoro, especially once they build extensive networks in prison. Indonesian jails are known to be radicalization hothouses, where younger prisoners are influenced by older inmates such as Bashir.

It remains to be seen whether the focus on terrorism will hurt Jokowi's efforts to secure public and private capital for the county's ailing infrastructure, critical to stimulating an economy that grew 4.8 percent in 2015, a five-year low.

"As long as investment growth remains sluggish, another 5 percent GDP growth this year is never to be taken for granted," DBS economists said in a recent note.

Graham believes Jokowi will be able to ink a few high profile agreements, including a host-to-host agreement on the 2018 Asian games, noting that such deals would benefit trade ties.

It's interesting that Jokowi left out France on this trip, Chapman notes.

"He left out France because there's a Frenchman on death row on drug charges. The last time Jokowi was involved in this kind of thing, there were lots of tensions involved," he said, referring to the Bali 9 affair, in which two Australians were executed despite Canberra's appeals.

Indonesia enforces the death penalty for the trafficking large quantities of category one drugs, which include heroin and methamphetamine.