Anything chemical, including electrolysis, risks damaging the files themselves.
Ultrasonic cleaning won’t hurt the tool but is unlikely to dislodge filings compressed tightly into the gullets. It may remove contaminants that are holding others.
.
Diogenes’ and Jason’s methods are the best; though I generally use brass not copper.
You can also reduce “pinning” (jammed filings) by rubbing blackboard chalk into the teeth, once clean. Note: blackboard “chalk”, not the rock, which could be abrasive itself or may contain grains of sand or flint.
I was taught those two tips in Metalwork at school! Thinking about it, and not knowing what blackboard chalk is made from, I wonder if talcum powder would be as effective. If nothing else you’d have some sweet-smelling files…