Although world trade, which collapsed last year, is beginning to recover, driven by demand from developing countries, the recovery is being offset by added capacity in the large number of new container ships coming out of shipyards. Among those suffering the most are lines like the German carrier Hapag-Lloyd and the Danish group A. P. Moller-Maersk. Much like the giant banks crippled by the subprime mortgage crisis, the companies are now paying for having expanded too aggressively during the boom, according to analysts.