>>213379117 (OP)
It was more than just the actor's legal issues, the character itself was proving a dud so far. Thanos was mainly built up in Infinity War, just having brief cameos beforehand, however, the basics of "space bad guy who wants to collect the Infinity Stones" were there from early Phase 2 onward, so Infinity War just had to introduce him as a character to the audience, we already knew what his basic goal was.
Kang was just incredibly lame, and Phase 4 (and 5?) were not doing anything to help the perception. He looked silly, his name was silly, and nobody outside of comic nerds knew him, and even then, it wasn't like he was some fan favorite, beloved by all comic fans. His only MCU appearances being a chump in Quantumania and a one episode character in Loki was a baffling decision.
Doctor Doom already has more pop cultural penetration thanks to various Fantastic Four adaptations, Marvel cartoons, and other appearances for example in video games like Marvel vs Capcom, etc. He also was central to the Secret Wars events they are drawing inspiration from (both the original 80s one, and the Hickman one from 2015), and they have the basic hype of RDJ playing a new villainous character. People saying "but he hasn't been introduced", true, but again, neither was Thanos really, back before Infinity War there were similar comments, you only really need one film focused on a villain to establish them, and then wrap up the story in the second film.
Not saying it automatically will work, but I can see why they pivoted entirely away from Kang, and while I simply wouldn't have relied on Kang in the first place, if handed the same situation I would have pivoted too, rather than recast.