I think that Thomas Szasz was just as influential as Ken Kesey. De-institutionalizing the mentally ill was a movement of the times that took hold.
Yes, the “stupid book” was The Myth of Mental Illness, the “stupid movie” (obviously) was One Flew Over the Cuckoo’s Nest.
Szasz’s book was correct and influential on some things, mostly of the abstract variety, but the closing of the mental institutions was also due to other factors, mainly the state budgets. Also, with the new achievements in medication, it became feasible to treat people on an outpatient basis.
It is only with the ridiculous new bail laws that the problems have become acute. Even that was partly to save money, but it was also a legislative change now widely felt to be in favor of the criminal and against the general interest of the public.