Expanding piecewise polynomial using Daubechies wavelet
According to your formula, you also apply soft-thresholding to the approximation coefficients, which is not standard. Aside, your operator $W$ does not seem to specify the number of wavelet levels used. Finally, your class of signals does not seem to address the regularity at piecewise junctions. 

I believe in this case very unlikely that in a discrete implementation, without further relation between $m$ and $n$, you can find, theoretically,  a best wavelet in all cases, because $\|\hat{y}\|_0$ is a quite sensitive index (and it is not a norm).  Of course, a Daubechies with $d$ vanishing moments would seem appropriate.

But since the DWT is quite fast, in your context, you could just find a "generally best wavelet",  by simulating random signals, and iterating over some levels, and each Daubechies wavelet with moments in $[d-2,\ldots,d+2]$ for instance.