If you're trying to turn WordPress into an application, for christs sake go use Django, Laravel, or Rails. Don't send a CMS to do an applications' job.
Shit you don't even need a CMS at this point. I moved off WordPress to Hugo and SFTP and i'm happier than a pig in shit. Shit loads fast and no external threats.
And yet, I still can't master this