Thanks for your reply. I’m speaking as a developer interested in how this is achieved, rather than as a mapper. Apologies if I should have asked in a different place.
But yeah, I was basically interested in how the default map style on OSM calculates this and I think you have provided the answer in the link where it says “Landcover areas are ordered by area, with smaller ones later and collisions are allowed. It means that for a given layer smaller areas will cover larger”.
So it seems, given a subset of map data, its required to order features by area size and draw them in that order.
That makes perfect sense, so I’ll try and implement that and see how I get on. Thanks for clearing that up for me, so quickly 
Edit: thanks Walter for confirming this too.