I think the intention would be "B. Esgred stays to the end of the phase, is sacrificed and then Asha gains a power." But the wording is tricky and it may be "Endless loop of Asha gaining power" instead.
The "If you control Asha Greyjoy" portion of Esgred's text is a constant ability. From the RRG:
Some constant abilities continuously seek a specific condition (denoted by words such as "during," "if," or "while"). The effects of such abilities are active any time the specified condition is met.
So I believe that once Planky Town Trader's "cannot leave play" effect wears off at the end of the phase, Esgred should be sacrificed.
That leaves the power. The intent seems clear to me that once Esgred is sacrificed, Asha should gain the power. But it's worded as "sacrifice Esgred and have your Asha Greyjoy gain 1 power." and not as "sacrifice Esgred. Then, have your Asha Greyjoy gain 1 power." If the word "Then" was used, the sacrifice would need to fully resolve before the power would be gained. But it uses the word "and" instead.
Often with the word "and" you apply as much as you can of the effect. So you can't apply the "sacrifice" aspect until the "cannot" expires at the end of the phase, but there's nothing preventing the power from being gained. If this interpretation is correct, it would result in a winning infinite loop:
1. Resolve Esgred's constant ability
2. Check if Asha is in play (she is)
2. Attempt to sacrifice Esgred (cannot due to Planky Town)
3. Asha gains 1 power.
4. Resolve Esgred's constant ability since she's still in play
5. Check if Asha is in play (she is)
6. Continue until 15 power has been reached.
I'm probably missing something extremely obvious, but given the current wording it looks to me more like an endless loop of Asha gaining power.