Theoretically speaking, you should never use an insecure hash function even as a primitive in the construction of a secure encryption scheme, let alone use it for encryption. The reason for this is under all the theoretical definitions of semantic (or in public key model, equivalently the indistinguishable) security, the encryption scheme that you will construct is insecure.
The proof of the encryption scheme usually follows the following type of reduction. Assuming $\mathsf{X}$ is secure under the $\mathsf{Y}$ model, the encryption scheme is secure under the $\mathcal{A}$ attack. Here $\mathsf{X}$ is your assumptions, say the (collision, preimage, second-preimage, target collision, enhanced target collision) resistance property of the hash function family or computational assumptions like $\mathsf{DDH, DH}$ etc; $\mathsf{Y}$ can be standard model, random oracle model, ideal cipher model, uniform complexity model, non-uniform complexity model, etc; and $\mathcal{A}$ can be chosen plaintext, chosen ciphertext, known plaintext or known ciphertext attack.
Now in all the possible scenario, since you can find second preimage or collision for MD5 easily, $\mathsf{X}$ does not hold true. Hence, the implication is dangling. Recall that enhanced target collision resistance and target collision resistance are weaker notion of security than collision resistance and hence they will give you even less security guarantee.