What you need is a job that's largely self-evidently-verifying (can't be faked), doesn't really need to interface much with other humans (especially customers), and can be self-started/managed. For some homeless people, that job is picking up cans and bottles for recycling money, but it's hard to come up with more and better ones.
The core of the problem today is this: With modern tools, a modern worker gets 100 times more work done than a worker without modern tools. And you need to hire people who can use those modern tools and are trustable. Now, for most jobs you can train anybody to do it, but you cannot train people to be trustable and not destroy or steal your modern tools.
The massive infrastructure projects and massive industrial projects of the past could swallow all the workers you could throw at them. And it didn't matter much at all if a worker was any combination of a drunk, a brawler, somebody who didn't speak the language, involved with organized crime at his spare time. As long as he did his job. But today, the very specialized and efficient tools are too sensitive and you want to be careful who gets near them and operates them.
Putting the unemployed to do big infrastructure projects or similar is still better than them doing nothing – but mostly for their own development and spirits, rather than the actual work being done.
As for construction, yeah. I worked day-labor for 2-3 days total in my entire life, and it was hell. I have always been groomed as an intellectual knowledge-worker in offices. Assigned by a day-labor office, the contractors set me to working machinery I was totally unfamiliar with. Every day laborer was required to own our attire and safety equipment at own-expense. There was no way anyone could move up without specialized training and experience with the machines they put us on. I had to ride the bus around to time-sensitive jobs at random sites. Then blew the paycheck on a hotel with a shower. I was never gonna learn that heavy-equipment stuff if I had a bunch of computer savvy and risking injury. I literally couldn't operate the machine without my glasses falling off!
It's interesting how you allude to the Irish and Chinese rail workers, and dockworkers/longshoremen of bygone days. It's sort of amazing to think that my able-bodied ancestors could just throw themselves into some milieu and get paid for sweaty physical work. That doesn't seem possible in today's mechanized economy. President Kennedy warned us all from Butler County. Here we remain.