So you can complete a level and progress, but also have motivation to back and do it better.
Then these stars can be blockers to accessing later stages, so you may have to have an average of 2 stars from 15 levels to get to the next stage (which may be visible and locked, or may show up a 'surprise' reward later on in the game).
One particular game using this method Nintendo's NES Remix also adds "rainbow" level if you do particularly well and I spent a while getting them all and enjoyed having that structure. I would guess this all takes a reasonable amount of effort to set up on the dev's side though.
I'm reminded here of Wario Land on the Gameboy: you could finish the game by speeding through levels, but the time you spent collecting treasure directly influenced the prize you got at the end. Maybe that would be a good compromise for gamers driven by external milestones rather than personal ones.
In actuality, I actually quit in frustration about 3/4ths through the game because I realized I could just blunder my way through the rest of the game.
Eventually I got tired of the game after I stopped caring about optimizing, and then wondered why I should bother completing the game other than for the sake of completing it. Yes there was a storyline to the game which should be completed, but the storyline was disconnected from the essense of the game (which to me was optimization). I would have felt more purpose in finishing the game if the optimization mattered somehow, like for instance if it affected the storyline or progress of your character somehow.
I don't think it is a matter to me of "external milestones" vs "personal milestones", but more about engagement and immersion in the story and world of the game, which I suppose is something I am after in addition to simple mental exercise.
For comparison, another Zachtronics game "SpaceChem" does a great job in linking the optimization into the game and storyline though the following simple mechanism: in order to defeat bosses, your factory had to meet certain timing requirements. To me, that requirement made all the difference in terms of immersion.
I suppose one of the downsides of modern day indie game-dev is not having playtesters. But surely with early access these difficulties could be figured out.
Still I'm not necessarily suggesting that failure to optimize should block the player's progress. Rather that the optimization affects the game somehow.
In contrast, some of the less-friendly (and less-intuitive) limits in the "boss battles" of SpaceChem simply turned into big painful dead-ends, leading to me abandoning the game on the final level. (And swearing I'd get back to it... someday.)
I think the distinction speaks a little bit to the spectrum between "problem solving" and "puzzle solving". Both games are solidly in the former camp, but Infinifactory feels far more like a creative unique exercise.
Plus, I kind of need more of the life-lesson: Getting something "ugly" that works and then iterating is better than holding yourself to an emotionally-safe but difficult standard that keeps you from getting work done :P
( https://archive.org/details/GDC2013Barth at 19:20)
Personally I managed to keep up with the global optimums early on in the shenzhen campaign but as it went on my solutions were progressively worse than the population. (Or least the portion of it left still completing those puzzles.)
The personal satisfaction is still the main driver of course, I think having the base binary "solved or not" solution is a good way to gate progression as you can choose to optimize as you go through or do a success pass and then revisit for optimisations which suits different play styles. (Personally I like to optimize as I go).