Hi Rob, and hi Anaqim and other posters.
Thanks for the helping hand, and my apologies: this issue has been resolved and I failed to mention it here!
I can confirm that the ftp.lua code is still working, even with an IPv4 server! Frustratingly enough, after days of searching, I tried on a friends iPad (at his house), which magically worked. Then this same friend's iPad worked at my house as well, to my surprise.
I thought maybe it was an iOS version issue, so I tried updating and lo and behold, my iPad couldn't find Apple's update server! Turned out, in the end, that my own iPad had sort of crashed it's network protocol for some unknown reason, and all it took to fix this issue was to turn off and on the wi-fi for my iPad.
Yes, it all really was that stupid! Could have saved me hours of work to try this at first, but strangely enough Safari websites did work without fail (as I was using this device to search for fixes)...
Strange and silly, but I'm glad it's working again and I can proceed developing now. Thanks for all the help, and sorry for leading you all down the wrong debugging path!