Best to use a cabinet scraper to remove the loose varnish and then taper the good varnish around the edges with sandpaper and a
sanding block. You can the use oxalic acid,
google it available anywhere, to take the water stains from the wood. After that you can tape around the existing varnish about where you think it is still full thickness outside the taper you sanded and start building up the varnish. Once done, pull the tape and sand flush.
Sounds like a lot of workout but isn't, especially if you do all the spots at once. E best way to deal with varnish is to not let it go for long. A small bottle with a brush pushed through the lid and sealed is great to have around. As soon as a bit of varnish cracks or peels you can pull it off with a cabinet scraper, open your varnish jar and brush and coat it and close e jar back up with the brush. Really extends the life of external varnish and minimises the big year end varnish jobs.
Edit: oh yea about the epoxy, never ever use epoxy as a void filler for dents etc. if you absolutely must use it it is acceptable to use for gaps in joints etc. just remember that epoxy and wood share very different material characteristics. One is rigid and brittle the other flexible and soft. Where the two meet there will always be long term problems. Also note that epoxy does not like uv so make sure there are plenty of layers of varnish or whatever on top of epoxy to ensure it is uv protected