You wrote, "In your hypothetical example there's flaw I think. If you spend 1mm and then get back 1mm with funds flow during the 1st year, your initial investment will be bought back and will not increase your debts. Next year you can do the same, so the 1st million only would be added to debts. "
Yes, that's basically right. I'm assuming the $1M in drilling capex is spent instantaneously and then it takes a full year to get back that $1M in cash flow (where "cash flow" = (revenue per barrel - production cost per barrel) * barrels produced). So debt would be increased by $1M at the start, and then since you could repeat this again next year debt doesn't increase any further. So it's great from a debt covenant perspective, as I described in my post, but it makes no sense economically.
Note: this is just a hypothetical example. I'm not saying PWE is doing this, only that the debt covenant restriction incentives behavior like this.