In addition, the elites realised how poorly they were treated compared not just to the leading, but even to the capitalist nations of similar per capita GDP - that is, mediocre ones - and wanted to change that. Seriously, speaking of economic grievances, no one had more to complain about but the Soviet elites. Those who in America, had Learjets and beachside villas, had to make do with bugged apartments and black Volgas in the Soviet Union and they rightly saw it as unfair.
Both problems could be "fixed" with 1937-style repression IN ADDITION to 1933-style famine (because Soviet Union depended on food imports and the West won't give them in case of a new Purge), but Gorby had no balls for that sort of thing in 1987, and thank God he didn't.
Simply put, there was no way to fool too many people, increasingly well-educated and capable of critical thinking, for too long a time. Communism ended because it's time was up.