Jimmy Cagney handled a cane in many of his movies. He had a habit shared by Fred Astaire and many others. There was a particular longer rhythm they used with the cane while walking.
The cane would touch the ground only every other step. On alternate steps, the cane tip would swing up, anywhere waist-high to shoulder-high.
Left foot forward, cane touches ground... right foot forward, cane rises and slides back in right hand... left foot forward, cane tip slowly rises just in front of shoulder before falling back... right foot forward, cane tip drops and cane handle slides back into right hand. Just a gentle graceful arc up and down, instead of supporting every single weakfoot step.
I've actually repeated slow-motion through Cagney and Astaire films to see what they were doing. The height of the cane's rise varies, the angle between arm and cane varies, and the degree of slide through the hand varies. It's less of having a target, more like having a graceful, easy motion of the cane over a longer cycle than a single pair of steps.
It's fascinating to practice. It's a sequence which requires concentration, but which will eventually require no concentration, no volition. It's just a more natural way to handle the cane.
For me it varies by the environment too... just go back to normal walking when traversing curbs or obstacles... it's not a strict cycle. Other rhythms are possible -- one beat in four is easy, waltz time works too.
I saw a book once when mentioned "poking" the stick every fourth step, maybe a "push/poke" rhythm, and I think this may have been the same technique. That leads me to suspect there were books on cane-handling during daily life, 'way back when.
One minor benefit: Even if you walk on the edge of the sidewalk, with weak leg protected from traffic, some people (usually with phones) will try to walk within six inches of the cane. They require much more attention from others than what they're paying themselves. Twirling the cane is a good way to catch their attention -- people will dodge objects faster than they will people -- but the push/poke movement doesn't rise as high, and is less obtrusive, while still alerting the reptilian center of their brain. (And at worst, it's a friendlier block, holding the cane in the center... the tip doesn't point to them as would a horizontal block were it held by the handle.) It's amazing how many people will try to walk through others, but a graceful and unthreatening set of motions with the cane can help reduce the odds of negligence.