Critically, a community college will NOT cover beyond the first 2-4 semesters of a university BS degree.
This is also not a sustainable strategy. At an engineering school, 100% of freshman will take calculus, and a 300:1 lecturer to student ratio is super-profitable (even factoring in recitation instructors and TAs). The cost is in the more specialized courses, which have at least as much planning, drafting of homework assignments, etc., and where those go obsolete much more quickly.
If everyone did this, price structures would need to adapt. Universities generally use large freshman classes as moneymakers to support smaller, more expensive, more specialized junior, senior, and graduate courses.
As a footnote, things like AP exams and online courses can do similar, also at low cost.