I did it for a living for 25 years. You’re comparing apples and oranges. Traffic stops where an officer is assessing and building , or not establishing, reasonable suspicion or probable cause is good police work and very different from the rules of criminal procedure that are followed in a court room if criminal charges are challenged.
Yes, an accusation can be filed wrongly or with little evidence. When charges are filed there are fail safes in place which are review by a line prosecutor and usually a supervisor who is also a prosecutor. This is where charges are dropped many times. In the state system charges are often fiiled unilaterally, an officer, with check and balance occurring after. It’s not perfect unfortunately.
In the federal system no charges are filed unless a prosecutor, and supervision, agree with the investigating agency that enough evidence exists to do so. The check and balance is done before hand. That’s why the Fed system has a 95% conviction rate.
The training, guidelines , and protocol of state and federal LE are complex with many variables. I used to teach it at FLETC and at a university. I don’t want to bore you with it. I will say the officers and procedures in place attempt to ensure the right thing is done, however, at times officers do over step and wrong accusations occur.
On a side note regarding K 9 sniffs. Dont blame the officers. This technique has been decided valid by your state legislature and/or state courts. Law enforcement agencies do not make law, they only enforce what law makers decide they are.