RTB was good for the individuals who benefited and did allow some social mobility (often more for their children than for the purchasers themselves). It was a policy of its time, the population was relatively stable, and housebuilding was high in the private sector.
The big issue (imo) was the ideological decision by the Thatcher government to restrict councils from using the proceeds to build replacement council housing. This was entirely ideological and linked to the declining number of private landlords (around 8% of the housing stock was privately rented at the time). The Thatcher government had a deliberate policy of expending this sector; following RTB, they removed many tenant protections that existed at the time and introduced shorthold tenancies instead.
New Labour did not abolish RTB, but it did reduce its scope in some areas and periods. By that point, much of the most desirable council housing had already been sold. They also facilitated the transfer of large amounts of council stock to housing associations, which provided some protection from RTB and, to a degree, from government interference. However, they did not fund significant levels of new council house building—it didn’t fit the ‘aspirational’ New Labour approach—and instead presided over the expansion of buy-to-let, which did. They also oversaw increased immigration without adequately addressing how housing supply would respond, assuming the market would absorb the demand.
The last Conservative government were arguably even more damaging in that they lacked a coherent long-term housing strategy, relying instead on a series of short-term, populist measures. They reinvigorated RTB and proposed extending it to housing associations (even more dangerous, IMO, given how housing associations are funded). At the same time, rather than consistently supporting private landlords to fill the gap, they introduced tax and regulatory changes that led some landlords to exit the market. And, to top it all off, they bowed to NIMBY pressures, making it harder to build new homes for purchase, meaning they consistently fell short of their housing targets.