While there is no doubt some truth to the idea, it is still extremely difficult if not impossible to isolate that as the sole variable responsible, since people who are stupid, clueless, or have mental issues (Not sufficient to amount to a competence issue) also tend not to clean up or present as well in court.