I’m a beginner and I finally figured out how to do this. I have not tested this method extensively, but I don’t see why it wouldn’t work in all situations.
I’m not sure if this exact method has been shown before, but I made a video tutorial on how to make a shadow plane / shadow only plane. Takes only a few minutes with only a few nodes.
Basically if you want to composite CG footage with a shadow onto live footage, this should help.
Link to youtube so you can see how I did this: