There are different approaches to answering this question, but I will say as a pragmatic generalisation: no, that wouldn't be advisable.
For one thing, the standard procedures that can be applied to the "washing" of food products varies greatly depending upon their physical, chemical. and other characteristics. Washing of dry ingredients involves rehydrating them, and from the safety standpoint you are introducing further risks of "pulling in" more contaminants in the process without any definitive benfits to gain by doing so (and the quality standpoint will generally suffer greatly without further processing involved). (See FDA Guidance)
A better solution is to simply learn more about the supply chain and purchase from a reputable facility or brand identity, such as ones with 3rd party audit certification, e.g., at the GFSI level (SQF, BRC, FSSC22000, etc.), or private retailer branded items (e.g., Trader Joe's brands, Aldi's Fusia brand line, etc). Also, learn the types of illnesses that result from adulterated food: there's infection, intoxication, and infection-mediated intoxication, etc (source). Simply achieving lethality does not necessarily render food safe for consumption, so beware to keep that in mind.
EDIT: Please note that upon second thought, I'm not sure I'm able to disclose TJ's or Aldi's brand identity requirements guidance documentation as I'm not sure if it's covered under their NDA or not. To put it simply though, the reason why I bring them up is simply due to the nature of how contract manufacturing works in the retail food sector; they will not contract out to a manufacturer for an item packed under their own brand identity unless there is a certain level of assurance that no harm should come to their brand in the event of, e.g., recall or etc. Thus, anyone who is approved to manufacture under their branding has to meet a certain level of safety and quality standards, and the minimmum of which is benchmarked at the GFSI standard. Trader Joe's actually is even more stringent and has implemented their own standard as of last year, mediated by SAI Global. Therefor, even without the documentation, you can arrive to the same conclusion via common-sense.)