Before I really get into it, I'm just going to point out that you're taking upper end of one occupation and comparing it to the lowest end of the other.
4 years of pharmacy at 200k debt.
AACP asks schools to report their tuition and mandatory fees for the upcoming academic year for first professional Pharm.D., postbaccalaureate Pharm.D. and graduate programs.
www.aacp.org
That shows the tuitions for every pharmacy school. The average for in-state is 31k and out-of-state is 39k, and there's maybe 4 schools on that list that reaches 200k. Maybe you're including undergrad debt too, but it didn't seem like it.
2-3 years residency.
While it is true there's an increasing number of residency positions out there, it's not so high to be a major factor in my opinion. About 3k out of 15k graduates go into pgy1, then another 500 go onto pgy2 per year. I do think it's ridiculous how many residency positions there are, as they don't match up to the number of hospital positions, but it is what it is. Quite frankly, most pharmacists will go into retail which does not require a residency.
I'm not even aware of any PGY3s. If there are any, there's probably like 2 of them. I don't know why you bothered to include it except to be hyperbolic or you're just not aware how rare it is.
80k job
Despite all the doom and gloom posts, 80k is not the norm (even for new grads). It could reach there someday due to saturation, but it's not there yet. The only areas where it might be normal are for government work or for pharmacists who are cut down to 30 hours and unable to pick up more shifts. If you want to refute this, please provide statistical proof because I really don't want to read 1-2 pieces of anecdotes.
Anyways, income is mostly affected by region. California still has the highest salaries for pharmacy (60-80/hr).
Despite all this, I do agree that overall, the prospects for CS has become better than pharmacy as of late. While I'm perfectly well off now, if I was making my career choice coming out of college now, it would not be pharmacy.