Understanding the relative chronology of implosivization in Thai and Khmer, and how it interacted with the development of the scripts, is difficult (at least for me). In the first answer to this question it is suggested that the less complex letter developed from the more complex. This seems odd prima facie, and out of step with the other extra letters developed in Thai which all added material rather than taking away (e.g. ฟ from พ). Am I missing something here?
The Thai letter ด would not have been derived from the Thai letter ต. Both letters were introduced at the same time when the Thai alphabet was constructed (in the 1200s in Sukhotai).
When the Thai alphabet was devised, it served two main purposes. One was to be able to write Thai words and the other was to be able to write Sanskrit (or Pali) words. The Thai alphabet has one consonant symbol for every Sanskrit consonant sound and a few extra symbols, presumably for Thai sounds which did not occur in Sanskrit. Many of the spoken sounds produced by the consonant symbols have changed over time (the shapes of many Thai letters have also changed over time, but the particular letters ด and ต have not changed much since the 1200s).
The symbol ด (which is now pronounced like the English d) was not one of the symbols which corresponded to a Sanskrit sound. The symbol ต corresponded to the Sanskrit sound t (an unvoiced, unaspirated stop, with no English equivalent) and it is still pronounced that way today. I do not think anyone knows for certain how the symbol ด was originally pronounced, but the most plausible guess (in my opinion) is that it was pronounced as a glottal stop followed by an unaspirated t or d.
The Thai letter ท corresponded to the Sanskrit sound d (a voiced, anaspirated stop), and it was probably originally pronounced like the Sanskrit d (which is the same as the English d), but it is now pronounced like the Sanskrit th (an unvoiced aspirated stop, which sounds like the English t).