I agree! The US did this as part of the New Deal [1], it was called the Works Progress Administration (WPA) [2], making the federal government the largest employer at the time. You'd want to integrate that with employee unions; during good times, businesses work with unions to source labor. During hard times, the government steps in as the employer of last resort, using cheap nation state debt issuance to fund infrastructure projects to fill in private investment gaps. You of course then have to pay back that debt with taxes when the economy is booming again.
[1] https://en.wikipedia.org/wiki/New_Deal#Summary_of_First_and_...
[2] https://en.wikipedia.org/wiki/Works_Progress_Administration