Hey,
From the description that you have provided, I understand that you were not treated well by your last agency, and therefore you are struggling with this project.
I would like to offer you my services in helping to fix this mess, and also understanding how you can structure everything for your application.
I and an individual and have 6+ years of experience with Ionic, Cordova, Capacitor, Angular, NodeJs, PHP Codeigniter, AWS.
Just to make it clear to you, recovering back the ionic application just from the www folder is next to impossible, no matter what is told to you. We can salvage some part though.
We can discuss in detail as per your convenience.