This turned out a lot more interesting as an exercise, than I anticipated. In the first row of my answer, I give the basic elements we are working with, the D, the hatted D, and the slashed D.
Then, on the second line, I confirm the OP's observations that creating composite glyphs \hat{\slashed{D}} and \slashed{\hat D} cause distortions in the result. That's not too surprising, I guess.
So I figured this was tailor-made for a stack, wherein I could superimpose two of the basic elements atop each other to achieve the result. I first confirmed that the basic elements were all the same width, not augmented laterally in some way by the decoration. Of course, I wanted to avoid, if possible, double-striking the letter D, so I used a \phantom of D in one of the two elements of the stack. And I found, very surprisingly to myself, that the phantom distorted the results, as well.
About this time, Henri posted his solution, far superior to my own approach, since it naturally scales with mathstyle (whereas I would have to add the apparatus of scalerel on top of my solution to achieve that). I abandoned my solution, voted for Henri, and left him a comment of my \phantom observation. But then he asked for the stackengine result, so I continue.
The third line of my result shows those phantom results, with the hat being shifted left in the first, and the stroke being shifted left in the second. I figured it might have something to do with letter-specific kerns, lost with the phantom.
So, on the fourth line, I just lived with the double-striked D, same as Henri. But, this approach does not, in its current form, scale with the mathstyle.
\documentclass{article}
\usepackage{slashed}
\usepackage{stackengine}
\def\stackslashA#1#2{\def\stacktype{L}\stackon[0pt]{$#1{\phantom{#2}}$}{$\slashed{#2}$}}
\def\stackslashB#1#2{\def\stacktype{L}\stackon[0pt]{$#1{#2}$}{$\slashed{\phantom{#2}}$}}
\def\stackslash#1#2{\def\stacktype{L}\stackon[0pt]{$#1{#2}$}{$\slashed{#2}$}}
\begin{document}
Basic Elements: $D \hat D \slashed D $
Derived Elements:$\hat{\slashed{D}} \slashed{\hat D}$ (ugh!)
Stacked Phantoms: $\stackslashA{\hat}{D} \stackslashB{\hat}{D}$ (slight shifts)
Stacked Element: $\stackslash{\hat}{D}$ (double-stroked D)
\end{document}
