The DR-40 has a peak reduction feature which the DR-2d does not, which might actually be more appropriate for you than dual level recording. It automatically reduces input level when an overload occurs, then maintains that level until manually adjusted or until a subsequent overload occurs. Doing same as what a taper would do manually if they had started out with the levels set a bit too high. It should allow you to set your levels where you think they should be, without worrying about them.
Here's what the Tascam DR-40 web page states about it:
Peak reduction function that detects peaks and automatically sets the optimal level-
The peak reduction function automatically lowers the level when a peak sound is detected and continues recording. The level can be set automatically according to the sound source, so it is easy for anyone to set the optimal level. The "DR-40" has a total of three different input signal level adjustment functions including a peak reduction function.
The other input signal level adjustment functions are auto level (don't use that one!, it will constantly adjust input level), and a limiter. It's unclear how the limiter and peak reduction work in combination. Assuming peak reduction does what it says, I'd probably just use that and not engage the limiter.
DR-40 can also do the same DUAL_LEVEL thing as the DR-2d when recording from either the internal mics or the XLR inputs. Unlike the DR2d It does not have a mic-in jack which overrides the internal microphones, so it cannot record 4 channels of external input (can't do the DUAL_LINE thing). So you can also record a safety track with the DR-40 if you like, but don't really need to if using the peak reduction feature.
I've never used a DR-40 so I can't say how well this actually works.