Yes, in sentence 2, "otherwise" has the sense of "or" ("or else"). " It means that "there is no other way" to achieve something. " "Otherwise" has further meanings.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.