2004 Chevy Impala Fuel Injector

I recently had a fuel injector stick - mechanic “banged on it” to loosen it up and then flushed the fuel injectors. Is there anything I can to do prevent this from happening again or is this a sign that I will have to replace the fuel injectors soon? THANKS!