I also have to disagree with you about Lua being "incredibly sloppily written".
http://www.lua.org/ and
http://lua-users.org/ are two sites that are good resources for Lua. There are a couple of (dated) books available that target writing addons for WoW. There are some good WoW API reference sites like
https://wow.gamepedia.com/Wowpedia:I..._customization and
https://wowwiki.fandom.com/wiki/World_of_Warcraft_API that are pretty much up-to-date.