Nigeria may be forced to suspend its ban on cocoa bean exports, which is due to take effect from Jan. 1, 1991, after its apparent failure to beef up its cocoa-bean processing capacity, traders and analysts said.

Cocoa is Nigeria's second largest export earner after oil, and the traders said implementing the ban will cause massive losses in export earnings, and could pose a smuggling threat.The West African country, whose estimated 1989-90 cocoa crop was put at 160,000 metric tons by the London-based trade house Gill and Duffus, currently grinds around 11,000 tons of cocoa, the traders said. In 1988-89, total grindings were a mere 8,000 tons.

"The three big processing plants in Nigeria have a maximum capacity of between 70,000 and 80,000 tons," one trader here said. "The problem is they

rarely work above 15 percent capacity because of maintenance problems and the lack of necessary technology to keep everything working all the time.

''The largest factory in the country broke down completely last December during the height of the harvest and processing season, and they couldn't get it running again for lack of spare parts," he said.

The Nigerian government had hoped that by introducing the ban it will encourage overseas and domestic investment to help expand its processing plants, but such investment has not materialized, industry sources said.

They said the government had approached industry and trade representatives in Europe. "But no one with any sense is going to invest money in a country as unstable as Nigeria," one market source said.

''Can't you see it: a trade house invests X dollars in a processing plant and then the next year there's a coup, or the government changes its mind, and Bam! cocoa beans are exportable again."

Nigeria was again rocked by a failed coup attempt Sunday against President Gen. Ibrahim Babandiga.

Traders also pointed out that there had been little enthusiasm from within the country for investment in more processing plants. "The three processing plants have applied to Nigeria's central bank for a 150-million- Naira loan to expand capacity, but even that was refused," one analyst said.

''There has been no money coming from outside the country. Their plan would require mammoth outside investment, and the problems in that area of the world are just not conducive to large long-term cash commitment," he said.

The traders said Nigeria's announcement of the ban on Jan. 2 initially looked good on paper, "but they hadn't thought it through," according to one analyst. "They have really shot themselves in the foot with this decree, and now they're going to have to change their position in some face-saving fashion.

''If they insist on implementing the ban, the price paid to the farmer would drop through the floor because of necessarily decreased demand, and there would be a huge smuggling industry . . . because the country's farmers simply cannot survive without cocoa revenues," he added.

Trade sources here said that high-level meetings had been taking place recently in Nigeria between the government and the cocoa industry to find a way to phase the decree or suspend it altogether.

Some said a phase-in of the ban might initially be announced as a way of gracefully backing out of the dilemma.