There are two ways to have absolutely perfect stopping. Either you make like 8 stop animations for every key frame (as in KEY frame, not keyframe) of walk cycle and short blends, or you make less animations, but you make the controller finish up the walk cycle, even though player stopped the input, so it is in proper key frame to blend out to WalkStop animation.
Both ways have negative side. The first solution with 8 (or more) stopping animations has short blends - that means you will very often see animation snaps and hiccups, when blending from anything different than the key frame it is ment for. So for example, if you use additive animations, or you need to blend out from slightly modified pose, you will always see a snap, because of very short blends.
Sencond solution with preventing the character to stop, before it reaches it desired pose to blend out, obviously makes the controller less responsive (but works great in adventure or rts games and anything that doesn’t require precise platforming movement).
For me and most AAA games, two stopping animations and longer blends usually work good enough (but that is my opinion, many people might have different, like always). If you add some IK foot planting system for it, then it can be even more reliable. Of course there are other systems possible - for example two different idles (right side forward and left side forward), like in Assassin’s Creed - this makes stopping blends a little bit easier, but it requires most animations to be doubled.