I can only speak about Guatemala with any authority, but that's not exactly what happened. The relationship between UFCo and IRCA was complex, but UFCo never owned more than 42.6 percent of IRCA. The IRCA was listed on the New York Stock Exchange until 1965. IRCA was a busy general commodities carrier. Bananas never represented more that 13 percent of revenues. Coffee was the largest single commodity carried, and as a group imported goods (largely headed for Guatemala City) exceeded exports.
The UFCo was forced to divest itself of its IRCA holdings following a 1958 anti-trust suit in the U.S. over monopoly practices in the banana trade. Following the opening of the Atlantic highway in 1959 the railroad rapidly went downhill.
On December 27, 1968 the government siezed the railroad without compensation as collateral for loans made to keep it going. By the mid-1990's the railroad was effectively shut down.
The railroad's misadventures in the 1960's and 70's resulted in diesels being sidelined and steam put back into general use. It was a good place to go after the DRGW abandoned narrow guage freight operations.
Henry Posner is making a valiant effort the get the railroad restarted. It hasn't been easy, and it's nice to hear good news.
The controversial history of UFCo ("El Pulpo", the Octopus) is well documented in the "The United Fruit Company in Latin America" by Stacy May and Galo Plaza, which can probably be found in better libraries.