Do you want to replace all instances of the pipe character with an underscore, or only if they're in the field name?
You can still run a custom normalizer/char filter, just apply it to the
_source field and it'll replace all the pipes regardless of location.
If you need to run it on all field names, then you can try using a Foreach processor on the
_source and it'll run the Gsub against all the top-level fields. If you need to to apply it to subfields as well, then you get into recursion and it can get complicated fast, depending on number of levels and uniformity.
You can always create a custom pipeline. With the script processors you can do a whole lot of things, but when you start to get into this level of complexity, it might be worth taking a step back and re-examining the problem starting with where the content is being indexed from and how...
Spend some time reading the helpdocs, and think outside the box. You can do almost anything. Some things scale and some don't.
Also, generally speaking, try to give more specifics on your use case when asking for help. Include examples.
Hope that helps.