The difference in accident rates between the DA40 and DA42 is not necessarily a function of how many engines the aircraft is equipped with.
There are numerous possible causal factors for aircraft accidents which could be responsible for the difference in accident rates between these two types.
The first thing that comes to mind is that the DA40 is very difficult to stall.
When demonstrating stalls as a flight instructor you have to crisply and deliberately pull the nose up to get a stall "break". If you are not aggressive with the elevator, and you pitch up gradually to maintain altitude as speed bleeds off (like you do in aluminum airplanes) it wont give you a stall break- it just mushes and loses altitude at its low stall speed of 49 KIAS (flaps down).
While demonstrating a "Power On"/"Departure Stall" with full power, it is nearly impossible to get a stall break unless you are extremely aggressive.
Thanks to its low wing loading, the DA40 can be landed somewhat slowly and, perhaps, even softly in any random field or open space and have a relatively short landing roll.
This is not the case with the heavier DA42.
In addition to being a light aircraft with a high lift wing and excellent, low speed, climb performance, the DA40 is unbelievably easy to fly.
The DA42 is a heavy, faster aircraft with higher wing loading and a (marginally) higher stall speed of 57 KIAS (flaps down).
Unlike the DA40 you don't have to force it as enthusiastically to get it to stall. It is a heavy airplane. It will stall.
Unlike the DA40, the DA42 takes FOREVER to accelerate to takeoff speed and requires a lot more runway (1400 feet vs the DA40's 800 feet, depending on temperature and Density Altitude). This is not only because it is heavy, but because the TAE 125 engines are only 135 horsepower each. The only reason the DA42 can cruise at 155 KIAS is because it is so aerodynamically clean (unlike a Piper Seminole which requires 180 horsepower engines to cruise at the same speed).
If most accidents happen during takeoff or landing, this unusually low power output is not an advantage for the DA42 (nor is the retractable gear which could be forgotten).
In comparison, not only is the DA40 super easy to fly and hard to stall, but the engine responds immediately with a good amount of power (in comparison to its weight) and it climbs like a rocket and can easily clear obstacles after a short takeoff roll.
Additionally, the DA42 takes A TON of right rudder to keep the nose on centerline on takeoff (enough to make your calf sore).
If you lose directional control and go off the runway you just became one of those accidents in the statistics (another one that would not happen to a DA40).
DA42s are used for multi-engine training. Unlike with the DA40, there is a possibility (though slight) of an accident related to engine-out training.
Although a simulated engine-out landing in a DA42 is a "non-event" if you have the rudder trimmed correctly (and you do have the simulated dead engine available to use if you had a real need for it).
With fixed landing gear, the DA40 cannot be involved in a gear-up landing, which could contribute to the DA42's higher accident numbers (especially since so many are used for multi-engine training).
Perhaps an even more likely cause of the DA42's accident rate is the type of mission it is used for... while a DA40 will often be used for fun relatively short VFR flights where no weather is encountered, it is more likely that a DA42 is going to be used for cross-country "mission"-type operations where you need to get somewhere, making it possible for the pilot to experience "get-there-itis" which causes the pilot to continue into weather they should not.
These longer "mission" type flights will also take the aircraft into environments where you may encounter weather that is not expected or is possibly hazardous (depending upon the accuracy of the weather forecast at the time of departure).
If the DA42 is equipped with the TKS anti-icing system the aircraft is far more likely to be used on a flight where icing may be encountered, which introduces weather conditions/hazards that the DA40 is far less likely to experience, due to not being taken intentionally into icing.
Depending upon the attitude of the pilot, the TKS anti-ice system could give a false sense of confidence to enter icing conditions which should be avoided.
Note that for the TKS to work you must coat the wing with the fluid BEFORE you enter icing conditions, not after.
Or perhaps the difference is all due to the takeoff roll taking far far longer than anyone expects... And gear-up landings.
We had a customer many years ago who landed one of our DA42s with the gear up.
Interestingly the aircraft sat on it's exhaust pipes at the front and on the ground-down boarding steps at the back, the structure did not touch the ground anywhere. Of course the props were destroyed.
Regarding twins being statistically "less safe": A twin can be more safe if the pilot is is mentally "spring-loaded" for an engine failure on takeoff, proficient at engine failure procedures and single-engine flying, and calculates the single-engine climb rate for that day's conditions to ensure that all obstacles can be cleared.
Of course this is dependent upon promptly and properly responding to an engine failure calmly to identify the failed engine correctly, establish zero side-slip and clean up drag (flaps, gear, feather prop).
Sadly, the statistics show that many multi-engine pilots are not ready for an engine failure and react with surprise and lack of proficiency. With the DA42's FADEC (no mixture or prop controls), it could not be easier to get the airplane into the correct configuration.