I would use a marine epoxy (WEST, System Three, etc.).
If you are just going to "paint" the edges, then you would use neat (plain) epoxy. If you are going to relieve a bit of the core, then you would start by painting the relieved area with neat epoxy, and then filling with thickened epoxy. If you fill to a peanut butter consistency it will not run back out.
Another option (and one I've just been trying out myself) is to use WEST 610 epoxy that comes in a caulking tube. This is pre-thickened, but, they say, can also be used "straight" onto things that you would normally wet out with neat epoxy first. I don't know that I would skip the neat step on, say, a transom area below the waterline, but I think it would work well where you are talking about (and it may work fine for the former as well, but I have not done any testing).
It's kind of an uncanny product: It flows quite well when you "work" it, but then when you let go it stays put and is thicker. Sounds impossible but that's the formulation. It's not cheap, at around $20-$22 for a tube (which is only half full), but it's so darned tidy (I have saved a bundle in gloves alone

), and there is so little waste that it's pretty sweet. Especially if you don't have another need to stock up on the whole kit and caboodle of epoxy/hardener/thickener, etc.
(There are still things you can't do with it, so not saying it's not good to have the usual materials on hand for other things; but not everyone does other things.)
Sunbeam
PS: For some tighter areas, I dispensed the 610 without using a mixing tip (saves a tip), mixed it by hand, and then put it in a syringe. The combination of caulk tube and caulking gun can be a bit unwieldy in certain locations, whereas the syringe is small/short.