The default combat turn order is handled as part of the game engine's combat module and is not configurable.

However, both behaviour script and Osiris/story script can detect the start and end of a turn, and change whose turn it is in combat.

In this case, Osiris is probably most suited as the Shared Mod already has some helpers regarding combat management (like https://docs.larian.game/Osiris/Shared/DB_CombatCharacters). The routine to switch to another object's turn in a combat is https://docs.larian.game/Osiris/API/JumpToTurn. The related routines and a hlper to get all characters that are in a combat are linked from there as well. Getting character attributes (such as Wits) can be done with https://docs.larian.game/Osiris/API/CharacterGetAttribute.

The main potential issue I see with doing this in the main game, is that JumpToTurn is already used sometimes in scripted events/combats (e.g. to give Windego the initiative in the boat, or Dallis and the Cloaked Figure during the assault on the Lady Vengeance). I'm not sure what the effect will be if you override that, and I cannot think how you could avoid such conflicts.