The code in
ftplugin/plaintext.vim is run when the file type is set, which occurs after the file has been opened.
So you are setting up your autocommand after the file has already been opened. Thus, the autocommand never fires. If you were to close and reopen the file in the same Vim session you'd find
formatoptions set correctly.
Easiest fix is to move your line to set up the autocommand into your
Edit: It occurs to me there might be an additional problem even when the autocommand does fire: the value it sets might then be overwritten by the code in your ftplugin file: if simply moving the autocommand doesn't fix the issue, you could also try checking the file name in your ftplugin file:
" Don't overwrite value set by autocommand
if expand('%:t') != 'requirements.txt'
Edit 2: Of course, with the conditional in place, there's not much point in having a separate autocommand!
if expand('%:t') == 'requirements.txt'
I have a nagging feeling there's a more elegant way to implement this, but right now what that solution might be eludes me. Perhaps someone else will provide an alternative answer later on.