So StackId is essentially a "string" value used solely for preventing a status from stacking with other statuses with the same StackId. There's no actual entry for this, as it's purely just a name id.
StatsId is a Potion entry that is essentially "consumed" when the status is applied. Check Shared's Potion stats for Stats_VenomCoating:
new entry "Stats_VenomCoating"
type "Potion"
data "Act" "1"
data "Act part" "0"
data "BonusWeapon" "Status_VenomCoating"
So you can see here, this potion entry also referencing a weapon, called "Status_VenomCoating". That's in Shared's weapon stats:
new entry "Status_VenomCoating"
type "Weapon"
data "ModifierType" "Item"
data "Damage Type" "Poison"
data "Damage" "1"
data "Damage Range" "5"
data "DamageFromBase" "40"
The weapon stat here is applied as a "BonusWeapon", which adds poison damage to the character's weapon.