Is it possible to securely factory wipe a phone directly after encrypting it? I would really like to make my phone more secure. But at the same time I want to be able to factory wipe it any time. I'm afraid that factory wiping could brick the phone/makes it unusable. So is it safe to wipe the phone directly after encrypting it?
Phones delivered with or since Android Lolipop, which came out in 2014, are encrypted by default. Android uses full disk encryption, same as Apple's iOS. This means that every block is encrypted, not just specific files, but also the meta information which describes where is what.
A factory reset will clear the decryption key used to access the data and descriptive information. So once you perform factory reset, it is effectively wiped, as none of the data blocks can any longer be accessed without that key, its practically random data.

I'm afraid that factory wiping could brick the phone/makes it unusable

This is not an uncommon operation. Factory resets are frequently used by diy people installing their own custom ROMs. It is also standard practice when reselling or disposing a phone. It is likely a very well tested feature, since it a user accessible feature.