considering most people would have all of a characters base stats set up by default in the database anyways
Not really, most users wont be putting all of the Traits in their actor, and thats what adding Traits mid-game is for. Even just talking about Ex and Sp params, most wouldnt be using all of them, or have them setup already.
practically speaking, its just calling the trait object of the actor and using the .push function to it (assuming its just an array) while supplying the correct data for the new Trait to be added (iirc traits only have 2 components, the trait ID which tells the game what trait it is and the value)
Actually I looked again on what you first posted and it seems you used $dataActors, that object actually is loaded from the database every the game runs, and changes to it doesnt get saved in the save file. When an actor is initialized in the game, it creates a new entry in the $gameActors object and uses the data in $dataActors as initial values but after that all changes should be done via $gameActors afterwards since that is what gets saved in save files and is what is actually used by the game. Once you close your game, the changes done to any $dataXXX object is lost and during the next run of the game it will load the values for the $dataXXX objects again from the database.
You can test it by playing your game, run your function, save, close the game, open it again, load your saved game, then run your function again. It will show you the same set of values from the two runs, when it should have shown you successive values (like if first run is 0.05,0.1 then second run should already be 0.1,0.15)
Now because of that, there's actually a problem. Game_Actor actually just reads the $dataActors object to get the actor traits, and since $dataActors doesnt get saved into the save file, you cant make Trait changes to the actor that actually gets saved. Ofc we can add $dataActors to the saved file but that would mean saved files wont take into account database changes to Actors (which might be fine or not). So if you want Trait changes to actor that persist on save files while maintaining linkage to the database, we actually need to define an additional traits list for Game_Actor itself. Or you would use invisible states to modify the Traits
Take note though that modifying $dataActors also has another side effect due to its nature. If a player don't close the game, the $dataActors data doesnt reload from the database even if he goes on a new game, meaning your edits to it will also be present in the player's new game. You can actually test this by playing your game, then use your sample function above, go back to title and start new game (remember without closing the game) then call your function again, your first console.log on the new game will be same as the last value of your last console.log
so like if ur base crit was 0.05, your console log will be
0.05
0.1
0.1
0.15
while it should have been the same set of numbers
0.05
0.1
0.05
0.1
That is unless they changed the $dataXXX to force reload during New game in newer versions of MV