It's not just competition from newer, more efficient planes that killed the MD-11 -- the aircraft never achieved the operational specifications promised in the pre-sale phase. It didn't make its efficiency benchmarks. The numerous safety issues associated with the DC-10 in the 1970s were dealt with long before the MD-11 came along. It just turned out to be a money-loser.
(The DC-10 had a lot of design corners cut because Douglas was in a cutthroat competition with Lockheed and the L-1011... the goal at Douglas in the early '70s was to "fly before they roll out," meaning beat the TriStar into the air, and, oh boy, did they pay for that. Remember, the DC-10 had its US operating certificate jerked in 1979, grounding the whole US-registered fleet and doing terrible harm to UA and AA.)