Render points only if visible from another camera
All you need - projection mapping. Just put additional UV layer on objects which you want to control, add UV project modifier, and add new logic to material. Second camera projects normalized UV coordinates [0;1][0;1], but we can calculate if some point is outside and apply different material to it. Emissive like on first screenshot, or Transparent like on second one.





OK, lets get really freaky!

Of course, you have to render Z-channel to some EXR file (or sequence if you have an animation). Then add more to material: drivers to get camera position, math nodes to calculate distance for sampling point, and little more to avoid another reincarnation of z-fighting problem.

Just one fix to previous: that UV projecting produces "square", so you have to correct aspect (based on projecting camera render), it was 1080/1920=0.5625 to ScaleY.

I love Cycles magic!