Most of the wood around the hatch was rotten and it didn't take much effort to begin removing it, especially around the corners. It doesn't look like the damage extends too far though. I'm no wood expert but I think the core is balsa, at least on this part of the boat.
It looks like balsa - I don't know of any other core material that looks like that so....
I will probably dig a little further and glass it all before drilling completely through the deck and put in bolts instead of screws. At least this is my current idea unless someone here advises otherwise.
Get a "wing" or skinny rabbeting cutter for your router and use it to cut back the balsa to good wood. I've also seen recommendations to simply use a bent piece of coathanger in a drill. After everything is cleaned up, pack it full of thickened epoxy, just like potting a fastener hole. Make sure the epoxy is THICK - like peanut butter so it won't slump out before curing. Running a strip of packing tape over the edge has worked for me - it peels away easily after things cure. Sand everything to clean it up and you're done.
Another thing that did strike me was that on the port side, the bottom of the side has a piece of heavy cloth that didn't seem very well glassed in with some large gaps and obviously not much resin on it (see picture). Also, there is a good void between the plastic liner and the bottom of the cabin. There is a piece of something (too dark to see) that finally unite them somewhere down there and is probably a backing structure for the handrail. The curious thing is that there is no void of the starboard side. The wood trim on the forward bulkheads (where the hatch is located) show a little asymmetry too, so I assume that this dates back from the building of the boat. Any comment on that? Thank you. Florent
Inner liners don't fit tight against the hull or deck except on the very highest quality boats in my experience. If you want to improve this area somewhat and the separate pieces are not held rigidly by other structure, pack the gap full of wetted out glass and clamp the liner and deck together. Do this before filling the edge of the deck core so you can do the finish work all at once.
I had the same situation where a small hatch had been added over the head on my boat. I did the above procedures, cleaned it up and then filled and finished it to a level that could be painted and didn't require any further trim to cover up the edges.