There are tons of trades that do not require you to ever leave a machine shop or electronics lab. If said person is very capable of coding then I would also strongly encourage them to pursue it, but to convince them that it's their only chance? That statement seemed to be a bit of a stretch. Whatever endeavor though, I wish them luck.
A large percentage of work for plumbers, electricians, HVAC, etc. is in new construction. It might be an issue for some employers, but it won't be for others.