Formal training is an amazing thing. If you have the means, I would definitely go for it. With that being said, I refuse to believe it is mandatory. Let’s remove dj/producing, and ask “can someone self-taught be as successful as someone formally trained.” The answer, regardless of field, is yes (but it may take longer and require more perseverance).
When it came to classical composition (I’m no Verdi mind you), I had been self-teaching myself for 2 years before I studied under an instructor. For 18 months, I studied tonal music about 50 hours a week. I learned a great deal through the emulation of Bach, Chopin, Mozart, etc. (the highest form of flattery is imitation, afterall).
When I started instruction, my pieces were more intricate and displayed a better understanding of theory than guys who have had 4-5 years of formal training. Also, because of the struggle I put in, I feel I retained information much better than just doing an assignment, moving on to the next technique, and then forgetting about the previous assignment. However, I did notice when dedicated under an instructor, I was progressing at a much faster pace. I was always weak in regards to fugal composition, and with an instructor to guide me, I found myself increasingly advance in this area.
TLDR: You’ll progress faster with formal training, but I wouldn’t deem it mandatory. If you are constantly reading/watching tutorial videos on synth programming / your DAW of choice and watching what other djs do with their sets, you will acquire the techniques you seek. While I can’t speak for production (only composition) I can tell you it takes years and years to develop your sound and to have people hear a song/piece and know you produced it. With production and the sound-creation process it may be different.