It's certainly true that the most dangerous time for an engine failure is on takeoff; it's also true that an engine failure may be more likely at takeoff than at other times during the flight, because the engines are typically near/at full power only during takeoff.
That said, there are different types of engine failures. In a contained engine failure, the engine stops working for one reason or another, but no other parts of the airplane are damaged/affected. In an uncontained engine failure, pieces of the engine become detached and can fly into other parts of the plane, potentially further compromising flight characteristics. Obviously, an uncontained engine failure has a much greater potential to be a serious problem than a contained failure. (In one particularly gruesome event a few years ago, a passenger in the rear of a DC9 was killed when a piece of metal from an uncontained engine failure pierced the fuselage.)