Best way to make an NPC character's feet lock/snap to the ground on uneven terrain?

I have a bidep NPC who walks around the map using a root motion based locomotion system. I want the feet of the character to react to ground with uneven height and slope. I’m a little overwhelmed by the options: Foot Placement node, Control rig, Two Bone IK node, Leg IK node… What’s the most appropiate approach for what I’m trying to achieve?

You can consider following the steps in these videos:

Here’s another one with less explanations but is a shorter video: