I assume an octopus would spend less time in your stomach than a hamburger would. Like a few seconds, probably. It would likely be fine just passing through.
You might be right, but I’m pretty sure if it did survive it would be pretty fucked up. Even if it was just a few seconds, that’s like jumping in a pool of hydrochloric acid and then getting out. You would definitely not be comfortable.