This is much more complicated than needed. Following the Hacker’s Diet [0] is simple to understand and sufficient, and yes, heed common-sense things like good sleep, some basic exercise, stress reduction, and eating healthy food.

[0] https://www.fourmilab.ch/hackdiet/

Huh, this looks like the same thing I came up with about three years ago. I'd tracked my weight for a long time and only just started tracking calories, then a month or so in wondered if combining the two datasets would result in anything useful. After about six months there were some obvious patterns, and ever since a year in I've been able to control my weight however I want without much effort.

One graph I have that I don't see on there is average-calories-per-day on the X axis and weight-change-per-week on the Y axis (scatter plot). Sticking a linear regression on top told me all those online estimators for how many calories you burn in a day are just wrong, at least for me.

That scatter plot is a nice addition. One property of the Hacker's Diet is that the absolute numbers don't really matter, as long as the weighing and calorie balance are roughly consistent. What's relevant for the feedback loop is the weight slope, and the target can be something like losing 15% of weight, and a 10% calorie deficit might get you there in n months.

The combination of daily weigh-ins and the exponentially weighted moving average I learned from the Hacker Diet has been absolutely magic for me. It gives me helpful daily feedback signal in the noise of ~5lb daily weight variation. Beeminder has replaced paper graphs for me. Their new moving average isn't quite as helpful for me, but is still workable. I target rates of weight loss on the order of 0.35-0.50lbs/week.