We have timber window frames with aluminum windows that, in some places, have large gaps of up to 8mm - see photo below.

(red line inserted to highlight the areas of gap)

We're going to be repainting these windows. My question is, what would be the best approach for filling these gaps?
My guess would be to have some strips of hardwood cut at bunnings to pack in the gaps flush with the aluminum frame, and then finishing with gap filler. If that's the best approach, I'm not sure of the most cost effective but appropriate piece of wood I should be using in that case, especially since they need to be in wet areas too (assuming this rules out laminated wood)?
My fallback will be to add some quad, but I'd like to try a more "flush" gap fill first and if that doesn't turn out well I can always add the quad afterwards to hide the poor attempt.