it's been 60 days + 30 day extension since almost a year ago. You don't need a tourist visa to stay 90 days. Tourist visas are also for 60 days and require the same 30 day extension so there's no point in getting one.
every doctor, clinic and hospital in Thailand knows what a medical certificate is, as it is required for many Expat activities like work permits, drivers licenses, etc. Costs as low as 100 baht from clinics, or up to 900 baht or so at hospitals. Just walk in and ask for one.
So that was the problem. You never had a visa. You entered via visa exempt entry, which is NOT a visa, but an exemption from having a visa. A tourist visa is where you apply for a visa using the online e-visa system or in-person from a Thai consulate/embassy and pay for either a single use 60 day tourist visa, or a 6 month multiple entry tourist visa, and are granted a visa in advance. It is far less likely to be turned away on a valid tourist visa than showing up and hoping immigration will grant you an exemption to enter without a visa repeatedly. Having said that, a tourist visa is still not a guarantee of entry, but is far less likely to cause an issue than repeated entries on visa exemptions. I suggest the multiple entry tourist visa to ensure that you aren't trying to get back-to-back single entry tourist visas from a consulate. By the way, "visa on arrival" is yet another separate thing where some nationalities that don't qualify for visa exemption must pay for a 15 day entry visa on arrival into Thailand, so you are using incorrect terms, so the first thing is to realise that you have not been entering with any visa or been granted any visa on arrival, if you are entering via visa exemptions.
for clarity, were you entering on an actual tourist visa/evisa that you bought from a consulate, or via visa exempt entry where you just show up without buying a visa first? Many people don't know the difference and use the wrong terminology.