On hand made fiberglass boats I cut strips on table saw from trex fascia board. It's plastic resin and saw dust I think. It does not soak up moisture. Glue that to the edges of an openING so it has a raised rim. Glue 1/2" inch closed cell foam to the inside of the lid so the lid clamps down onto the raised edge.
Fussy pain in the ass work. Lots of fitting and cussing and adjusting. But it does work. Water tight when done.
How to apply that to aluminum would require deep head scratching. I'm suRe it's doable