Thank you so much guys!
I have now tested all approaches, except CryptoMatte . The closest surface setting in the render node gave good result on close ups with a few grids, but when adding a crowd I got egdes around the alphas of the crowd, see screenshot where I have zoomed in a bit (light weight crowd is what I am wanting to use the grids for). Also picking an area from the P_world pass in Nuke was not very accurate. The shader approach looked great in the test frame, but when adding a crowd the render got very slow.
Deep seems to be the best option for me now, the rendering is quite quick and the flexibility is great. The only problem is the size of the files, but I think I'll just have to deal with that for now. Thanks for your good advice and your time!!