If you already have a hierarchy with the respective boundaries geometries just group based on elements that ST_Within or ST_Contains according to the zoom. level.