If you hike downhill all the way from A to B, the return trip from B to A will be uphill, barefoot or not. This is a factual fact.
then you wouldn't have hiked downhill all the way from A to B. of course, OP is assuming that you take the same exact route on the return trip. you could hike downhill from A to B and then hike down some more and then back up to A if you went a different way back.
If points A and B represented two points on the incline of an underwater trench, you could 'hike' down from A to B, wearing ankle weights or whatever, and then shuck the weights once you'd reached B, and, with a kick of the flippers, swim back up to A again, without having to make contact with the terrain of the slope at all.
As much as I would like to barefoot hike, I have no real choice but to at least wear high top shoes. We get rattlesnakes where I am. I didn't realize a snake bit was they clamped on and wiggled, always thought it was a quick bite and release. High top shoes wouldn't protect that much from a below the knee but above the ankle snake strike, but a bare foot makes no noise to otherwise startle the rattlesnake away if it wasn't coiled to strike.