I've never been happy about the way estate efficiency handling ended up. It would make me much happier if it were absolutely, 100% clear that
every knight you add to the region increases
every estate's productivity, at least a little.
(I'd also like to add the ability for Dukes to own land in multiple regions in their duchies, and Rulers to do so throughout the realm...but that's only peripherally related.
)
So, at some point (in my copious spare time...) I will be revisiting estate calculations, and while I'm not sure precisely what math I'll use, my intention is to adjust it so that:
1) Having lands designated as "wild" is generally worse than having them made into a vacant estate
2) Having more knights is generally strictly better than having fewer, on a gold-per-peasant basis
All that said, beware of creating scripts to calculate things in BattleMaster unless you are absolutely 100% sure of the algorithm used. There are lots of places where it's more complicated than it looks on the outside. I don't remember offhand if this is a case where the math used is more complicated than what can be relatively simply observed with a few data points; it's possible that your numbers here are all correct. Just be careful of it in general.