There is nothing wrong with getting off a horse when things are going bad. I've lead my horse two miles, down the trail because he was having a melt down.
Nothing I did from on his back was working. It was safer to get off and lead him till he settled down. When I got back on he was fine and rode like he normally does.
I've ridden with people that had barn sour horses. The one gal when we got to about a mile from home she'd get off and lead her horse. The mare would otherwise try to take off, buck ,rear and just be dangerous. In time she stayed on an I ponyed her home.
I rode with her for a entire summer every day ,this gal lead her horse out about a mile,then got on. It progresed to me ponying her horse out.
By late fall horse got to where she could ride out and ride home no issues.
No working the snot out of mare no harsh bits ,no crops,just plain patients and miles. Owner was not the bravest didn't want to get hurt. No one else would ride with her, because of her mares barn sour ways.
Better to be a chicken and get off ,then be a hero and get seriously hurt.