That's unsettling.
The easiest way out is probably #1, what probably will need the cooperation of some uncooperative 3rd party. It's the correct question, it's just that the answer sucks.
Tbqh, without you explicitly stating that you're aware of key pairs and concluded that storing plaintext passwords is the best solution for you, I would excuse anyone who thought that you maybe just hadn't done the research.
Also, there’s sshpass
As for an answer, i think something like
cat passwd.txt - | ssh
Might work. Didn't test it though. The cat outputs all arguments in order, and - is stdin.The meta-answer: if it was this easy people wouldn't keep asking about it. For decades now!
When I tried it fifteen years ago ssh insisted on reading the password from keyboard input, not stdin.
SSH reads the password from the terminal, otherwise it couldn't read the password on a piped input