I spent 10 years in college -- 4 for BS & MS, 3 other misc years, and 3 years for DPT -- only to be in that exact situation as a physical therapist, so only spending 4 years to earn twice as much on average during your career as a coder sounds great.
The bigger issue is that all of the people (in any industry) who have had little or no unemployment are always pushing the narrative that any periods of unemployment are abnormal.
Instead, I think it's reasonable to expect that you'll only be employed 75% of the time: 1.5 years working then 6 months unemployed and looking for a new job.