I manage this kind of thing by having one command called "init" which is not voice activated and setting my profile to run that command upon launch.
As I find variables which I want to (re)initialise after VA has closed or crashed I just add them into that "init" command - retrieving stored values, or setting them up manually.
For your purpose, you could do this to avoid having to clutter a bunch of individual commands with retrieval code, and then make a second new command which is voice activated and called maybe "New Session" or "Clear saved data" and have that one set variables which "init" has retrieved back to zero.
You seem to be talking about two separate problems - VA's actual internal variables, and a text file or files that you're appending to for OBS to display. You could use VA's log or text to speech functions to confirm what variables it is seeing while you debug, and then I think you'll need the "New journey/Clear saved data" type custom command to wipe or reset the OBS text file. Otherwise you're just appending more and more correct and incorrect data to one long file.