https://statswales.gov.wales/Catalog...thority-tenure
Cardiff Council sold all its remaining homes before the end of Welsh Right To Buy in 2019? That didn't sound right to me and the table above show they still own and manage just under 13,500 (which is more than the combined Registered Social Landlord - mainly Housing Association - stock in the city).
The number of private rented homes in Cardiff has dropped very slightly in the past few years - unlike the position in England where it has continued to rise as a tenure in absolute numbers and as a percentage of the whole housing stock.
You make it sound as if legally withholding rent on a property that 'is not fit for human habitation' is a bad thing, and driving landlords to sales who would otherwise be maintaining a bigger rental market. Bad private landlords, some of the bigger ones leaching on former Council homes, are a major part of the housing supply and affordability problem in the UK.