The blueprints-ai.lua file that Nomander referenced is what you want to look at.
Your obviously motivated to do something positive here. I don't believe we can dynamically adjust threat during the game as the blueprints are read once on startup sort of thing. BUT, I think the development team would be more than happy to see someone put time into improving the existing threat calculations that we are creating. The current calculations are based on a formula that Balthazar did however long ago and some adjustments since then and while it is ALOT better than what we had originally there is room for improvement.
You'll eventually hit limitations since threat also depends on situational factors (a sniper bot in dangerous unless an enemy Obsidian tank is sitting next to it sort of thing). So why not rather than making a mod look at improving what we are doing now? We're happy to collaborate and provide feedback on the impact it makes on AI games.