My neighbor was going through his field in an atv and a boar came charging out of the woods and rammed him, so I wouldn't count on them always running away.
I would not count on them running away either, but attacks on people not hunting hogs currently seems less common than attack on people by mountain lions, wolves, or deer. With very rare exception, "attacks" by feral hogs are almost exclusively by cornered, trapped, pursued/hunted hogs that are in the process of defending themselves. Even then, many of the "attacks" are the hog's attempt to escape and essentially running through the human in order to get to freedom.
Examples of "attacks" that really aren't attacks such much as they are hogs trying not to be harmed by humans...
So if you don't do these things, and as seen in some of the vids, don't do these things stupidly (in manners that allow the hog access to you), then you aren't likely to get "attacked" and if "attacked" then not likely to get hurt.
I don't want to invent a threat where there is none, but I don't really want to end up like Timothy Treadwell, either, believing "the pigs won't hurt me" right until one chomps down on my leg.
If you don't want to be the Timothy Treadwell of the hog world, then don't glue corn on your body with maple syrup and trap yourself with them. Treadwell camped unarmed with food and his girlfriend on a game trail in grizzly country and thought he was above being attacked. He went out of his way to prove how safe grizzlies were by doing stupid things and he was proven wrong. Don't do that!
Any animal you pursue can be dangerous. Any animal you try to harm can be dangerous. Any animal you startle or scare can be dangerous. Hogs can harm people, but if you aren't trying to harm or threaten the hog in some manner, the chance of the hog trying to harm you is extremely tiny. It can and has happened, but on the risk scale of what could happen to you while backpacking as the OP indicated, feral hog attack would be very low on my list of concerns behind things like coyote, raccoon, deer, and bird attacks.