Well maybe you couldn't, but that doesn't mean there's no way to set up appropriate technical instruction infrastructure as part of a union or guild through which this apprenticeship would go. Or even that one doesn't already exist.
Often, a plumbing or electrical apprentice will come up through a technical high school. Either a technical high school or a technicial continuing education program at a community college, say.
Heck my local technical high school offers an "Information Technology" vocational program that sounds an awful lot like that program I went through in college. Wouldn't it have been great to save 4 years and countless dollars?
For programming jobs, this gap is currently mostly filled with "bootcamps." Increasingly you'll find bootcamp programs that are free but garnish your salary for some time after you've been placed in a job, or the bootcamp is run by a company directly and you get paid to go through the bootcamp after signing a contract saying you'll work for them for a year or two afterward or else need to pay back the price of the program.
These can vary from "pretty good, actually" to "predatory" to "a little bit like indentured servitude." Wouldn't it be great if there were a union or guild around these practices? Or to encourage more kids to enter trade schools that offer vocational programs they're interested in?