The files that contain companion stats are in Data\NPCdata and start with Comp- or Unique- but there's a couple things you need to do before you can edit the files directly.
First extract the game's rgss3a file first with something like RPG Maker Decrypter and make sure to rename/delete the rgss3a file afterwards.
You need to then change "FileGetter::COMPRESSED = true" to false in scripts.rvdata2. You need to do this so the game loads data from json files you can easily edit rather than rvdata2 files iiuc.
Best way to do this I've found is to create a rb file in ModScripts with the line "FileGetter::COMPRESSED = false". Name it like "0__uncompress.rb" so it's on top of the load order above Teravisor's optimization files (I had some input lag and some other issues when I placed it after them for some reason). After that you can just edit the json files to however you'd like.
If you want to change how long companions stick around the files are in Data\HCGframes\event and start with where you find them (ex: DoomFortressInnCompElfArcher.rb). Just search for teamup and change "$game_date.dateAmt+" to the number of half-days you want. Don't mess with Cocona's file though.
Refer to these if you need help
Teravisors Mods and Code guide
Emperor_Indiora_Doom_Volt modding guide