You should be able to generate a ciphertext for any given plaintext using a padding oracle attack if you are using CBC mode. You'll need to be able to modify the IV though for it to fully work.
This is because every time you scramble an earlier block, you can just fix it by modifying the cipertext for the block before that (or the IV for the first block). If you can't modify the IV you are stuck with being able to modify all blocks except for the first (and the first one will become garbage).
The idea is to start from the end, and create a random ciphertext block $C_n$ (this can be fully random, a set of zeros, or any particular value you desire). When you then use the padding oracle attack against this block, you'll receive the decrypted value of this block: $\operatorname{Dec}(C_n)$ (as that is what the padding oracle can do for you: decrypt any ciphertext you pass into it, no matter whether it's valid or not).
Note, that $\operatorname{Dec}(C_n)$ will be garbage, but, since you are using CBC mode you can modify the preceding block $C_{n-1}$ in a way so it will actually XOR $\operatorname{Dec}(C_n)$ to your chosen plaintext $P_n$: $C_{n-1} := \operatorname{Dec}(C_n) \oplus P_n$.
Once you're done, continue the steps. You already know $C_{n-1}$, calculate $\operatorname{Dec}(C_{n-1})$ using the oracle, and then set $C_{n-2}$ so the CBC mode will XOR it into $P_{n-1}$, etc.
The only problem is with the first block. If you have access to set the $IV$ then it's not a problem, you just make sure the $IV$ is set to a value so it will XOR $\operatorname{Dec}(C_1)$ into $P_1$. Otherwise you are stuck, and you have to keep the first block as garbage.
See also https://crypto.stackexchange.com/a/50027/34606