No, I don't believe that Napoleon 'got what he deserved.'
And your point is illogical. One does not necessarily necessarily from the other.
D'Enghien committed a crime; Napoleon did not unless you accept that the other European heads of state and governments, Great Britain's included, committed a crime.