An APO address isn't a German postal address, and German forms often reject it outright. That matters more than it sounds, because the final bill arrives after you've gone.
It usually lands four to eight weeks after the contract ends. If it goes to an apartment you've moved out of, and the direct debit fails because you closed the account, German providers hand it to a collection agency quickly. People find out years later, applying for a mortgage back home.
Give them an email address that'll still work after you leave, and ask in writing for the final invoice by email as well as by post. We put that request in the letter.
And keep the German account open until that bill has cleared. Then cancel the direct debit. Then close the account, in that order, not the other way round.