Then it seems to me that the problem is that your example is simply inappropriate. If the peasants are essentially self-sufficient in a flourishing agricultural/mercantile economic system, what do they need stimulus for in the first place?
An example closer to the current situation, ISTM, is one where a large proportion of the peasant class has been working for, say, the wealthy grain and cotton merchants and other titans of commerce, which have just taken a serious financial hit.* (Bad storm season in the Mediterranean, say, and a lot of valuable cargoes are now resting on the bottom of the sea; throw in a few crop failures and defalcations while you’re at it.)
The merchants can’t get capital to finance new ships and are firing workers. The peasants who had savings and/or loans against the value of their farms and huts invested in lost cargoes are suddenly much poorer, and many are losing their homes; some are starving. Decreased consumption and fears of further instability are contracting economic activity further.
Somebody runs to the harem and wakes up the Pharaoh and explains the situation to him. The Pharaoh decides he needs some new pyramids and will put the starving peasants to work building them, paying them out of the royal treasury, which he will replenish with increased taxes when and as the economy gets back on its feet.
Voila, a stimulus package! The peasants are working (and eating) again, and they can afford to buy new sandals and loincloths so the leatherworkers and weavers are working (and eating) again, and so on and so forth. And there’s a bunch of big new piles of stones in the desert.
Yes, in the long run the populace as a whole is just going to end up paying for the functionally useless recovery project out of future taxation. (Of course, once they realize they can market the pyramids as a tourist attraction, the project becomes significantly more cost-effective, but let’s leave that out of our scenario.) But in the short run, a whole lot of starvation and misery has been averted, and that was the point.
*No claims are made for the historical validity of any part of this scenario, beyond the fact that pharaohs built pyramids.