I highly recommend his book: The Case Against Education - https://www.amazon.com/dp/B076ZY8S8J.
After that I realized grades were fairly arbitrary and explicitly aimed for Ds in classes I didn't care about and settled for whatever in the classes I did care about.
I've been doing graphics since high school, it was one of the few classes I was really excited about, and it's what I'm currently getting paid to do. I've never failed any other class.
In my opinion, the first two years of CS actually matter. Fundamentals like data structures, algorithms, and maybe even operating systems classes are great. Beyond that, most CS programs tend to be severely outdated - you'll learn more from internships and co-ops than another 2 years of classes.
Of course, take that with a grain of salt since I did know exactly what I wanted to do coming into college.
University professor here.
Perhaps it's too late now, but I would encourage you to make a strenuous effort to get your professor in as much trouble with the administration as you can. I don't know who the "class dean" is -- but contact this person's department chair, the departmental undergraduate director, the dean of engineering, the dean of students, the provost, anybody, everybody. Whoever will listen.
What you experienced is not okay. I'm sure it's not an isolated incident, but it's also not the norm.
As for the courses and the professors' capabilities, there are a bunch of systemic issues there. One is that "number of students who fail out" is a metric that is used to measure program performance, so first year is usually full of courses that are review for like half a given cohort. Another is that one often gets tenure for research, not teaching ability, so some professors optimize accordingly.
For what it's worth, there are plenty of folks who will tell you that you should "slack off" on a degree and just start a startup instead.