JTXR, the following is my own experience. I too had a similar situation returning from the US at end June. Due to limiting personal logistics, I scheduled my PCR test four days before my US departure and received my PCR test results 24 hours later but within the 72 hours of my actual US departure date/time. For me, I also pursued and received getting a signed "medical certificate" too from the testing clinic. The PCR test requirements per Thailand's COE application website (https://coethailand.mfa.go.th/) states that after the COE is approved, the traveler should have a medical certificate attesting the traveler is covid free issued no more than 72 hours before travelling. For myself, I made sure I had pre-typed and pre-printed a medical certificate (a letter) for the testing clinic's doctor to sign and stamp to which I attached the clinic's negative test results. (I didn't anticipate that clinics typically would provide this so I typed one up myself.) I then made sure I highlighted in yellow the date on the medical certificate and the date/time on the attached test result so that the < 72 hour timing was clear for airport/airline reviewers when I departed the US, for when I arrived in transit (Narita Airport), and for when I arrived to BKK. I encountered no questions or issues.
4. Once Certificate of Entry (COE) is approved
Applicant requests to print Certificate of Entry (COE) from website via Check Application menu (in the menu on the next page)
Applicant shows (1) Certificate of Entry (COE), (2) Medical certificate attesting that the traveler is free from COVID-19, using RT-PCR method, issued no more than 72 hours before travelling, and (3) relevant documents prescribed in Guidelines based on Regulations issued under Section 9 of the emergency Decree on Public Administration in Emergency Situation B.E.2548 (2005) (No.7) to Airline Officials and officials at point of Entry, otherwise might be rejected to enter the Kingdom
COE applicant for Sandbox programme shall prepare additional documents which are (1) an original copy of Certificate of Vaccination and (2) receipt or proof of payment for SHA Plus accommodation, specifying both accommodation fees and RT-PCR COVID-19 test fees. The SHA Plus booking confirmation shall be issued at least 14 nights, unless travellers have proof of return tickets leaving Thailand within 14 days after arrival.