I dont know how vast it is in Pakistan but caste and religion plays important role in my state. (Telangana former Andhra Pradesh). For example Owaisi brothers win in only Muslim majority areas (despite being corrupt). Jagan mohan reddy won 60+seats (despite being most corrupt politician in India went to jail on corruption charges because of his caste and his fathers legacy).
But the thing is we have 60+ years of democracy and more elections than Pakistan. So extreme corrupt and inefficient politicians gets knocked out in next coming elections. So, give it a time and people will come to know who are more corrupt and who are less corrupt. Bread& butter wins on all these factors like caste, religion.