I think you should start from stats, work out test cased based on those stats, and find, or let the computer find, a formula that interpolates between the desired behaviour in each test case.
For starters, I don't think "attack" and "defense" are actual character stats: they are synthetic values, computed from what really matters to the player for the sole purpose of the damage formula.
Real characters could have:
- general combat training
- innate combat talent,
- familiarity with their weapons and armour
- familiarity with the opponent's weapons and armour
- muscular strength and speed
- quick reflexes
- superiority of weapon/armour types (pairwise or in tiers)
- quality of weapon/armour design (e.g. well balanced)
- weapon/armour technology level (e.g. steel sword vs bronze sword)
- quality of weapon/armour manufacture (e.g. incorrectly tempered steel that is more likely to bend or break)
And in fantasy settings:
- cost/quality/rarity/quantity/strength of spells and magical items that buff of attacks
- cost/quality/rarity/quantity/strength of spells and magical items that provide healing
- cost/quality/rarity/quantity/strength of spells and magical items that protect the user
- favor of the gods
- current burden of hostile spells and curses
- moon phases or other astrological trends and moments
- countless other setting-specific factors and conditions
In a game many of these elements, even if important "in theory", would be deliberately ignored as irrelevant ((e.g. aircraft combat only -> no strength)), not interesting (e.g. metallurgy is considered not heroic) or counterproductive (e.g. weapon types are few and weapons of the same type are assumed to be identical because weapons are scarce and randomly getting a "wrong" or inferior one would be a problem), flattened to irrelevance (e.g. everybody is a knight of similar skill, training and equipment) or simplified (e.g. D&D treats innate combat qualities only in part as stats and mostly as belonging to the Fighter class or similar ones, which fight better than other people in a number of ways).
And some elements would be deliberately emphasized or downplayed, even to unrealistic extremes: in a game about the chosen of the gods, i.e. a kid, going on an epic quest to save the world combat training and experience should not be an important success factor for the protagonist, who should have little to learn and many decisive unique or magical items and resources to collect, while in a game about being the best gladiator in town magical aids should be illegal to begin with and no more than a nuisance for a smarter, stronger and better equipped opponent.