If I wash my hands regularly, can I prevent e.Coli infections?

Yes, sort of..... Your frequent hand washing will help prevent you from spreading e. Coli to others. Your risk of contracting e. Coli, however, is dependent on the foods you consume and the hygiene of those who prepared your food.
It helps. Hand washing helps prevent almost any infection, and it is a very simple and painless thing to do. It might not be as helpful vs. Ecoli from tainted food if it is ingested, but it sure helps clean off any that is not ingested, as well as helping stop person to person transmission. It helps to wash countertops when handling uncooked food for e.Coli and salmonella, etc..