Are jet engines designed in a way to make an explosion result in the least damage possible?
The most (kinetic) energy is in the fan and turbine blades and disc. The engine is enclosed in a containment chamber whose purpose it is to protect the rest of the airplane from shrapnel in case of a fan disc or fan blade failure. Here's a video of a test where a fan blade failure is simulated: 
                
             As you can see, the fan blade more or less completely destroys the engine, but no debris or shrapnel leaves the containment chamber.

Unfortunately, the turbine disc and blades have too much energy to be realistically containable. (In other words: the required shielding would be too thick and heavy.)

Engine failures where debris or shrapnel is able to leave the containment chamber is called an uncontained engine failure, and they are very rare, but they still do happen.

Since it is impossible to contain a turbine blade or disc failure, risks are mitigated in different ways, e.g. by requiring regular, very detailed inspections and extremely tight tolerances.