@Angeles ********
I really can’t say for sure. You can apply in Malaysia (probably better in Penang than KL but that’s debatable).
Having a tourist visa issued by a consulate/embassy is no guarantee of entry. Usually you stand a much better chance of doing so, but it’s up to the immigration officer you hand your passport to at the border entry point (air, land or sea) to either allow or deny.
With an extensive history make sure you have the “three proofs” that you may be asked for. 20k baht or equivalent in cash (bank statements or credit cards don’t count), booked accommodation and a ticket out of Thailand within the amount of days allowed by your entry method - ie 30 days on exempt or 60 days with a visa.
99% (a made up figure by me) of tourists will never be asked for these but with an extensive entry history you may well be. They’re the three reasons why you could possibly be denied entry. If you have them you may not be, but that’s no guarantee.