@Hannah Tate There is a lot of good information in here already. Mexico is my home market and Mike knows what he is talking about.
The thing that is very overstated here is the operating cost liability. You can't get around the auto withholding of taxes from the OTA´s as a foreigner in this country, but A. these are operating costs that exist wherever you invest and B. you more than make up for any loss of revenue by having operating expenses that are 50%+ less than what you would expect from a STR in the states or Canada.
The last point I would make is that people sometimes think of Mexico as the wild west, because information is much harder to come by, especially online in English. Just because the information is not as readily available online doesn't mean there aren´t people (agents, builders, notaries, accountants etc) and resources that can prove to be invaluable. I can give you some more specific advice on permitting processes and building. We built our personal home from dirt up and while it definitely can be more challenging, you will capture additional value vs buying new if it is done correctly.