I have bad water hammer at my pool filler valve which is just a toilet filler in the ground with a over flow pipe connecting to the pool.
I found out they make water hammer arrestors designed for toilets. Almost no plumbing required. Turn off water, disconnect supply line from the tank, connect arrestors to the tank then hose to arrestor.
Exact same idea as washing machine arrestors just different size fittings.
These are the sealed piston type not a long air column to hide.
Bill D