Before starting on how the X-Men could actually work in the MCU, let us establish some ground rules.
- Yes, Disney would have never greenlit Logan and Deadpool. Both of them are fantastic movie. But there is also a chance that movies like these would not be made by Fox, again. A huge part that drove these movies into development were Ryan Reynolds and Hugh Jackman.
- X-Men, X-Men 2: X-Men United, X-Men: The First Class and X-Men: Days of Future Past were very good movies, i.e., there will be no bashing movies simply because they are made by Fox. Mishaps like X-Men 3: The Last Stand, X-Men Origins: Wolverine and X-Men: Apocalypse do not undo the great work Fox has done.
- This article will talk about X-Men and how it could fit into the MCU, and not Deadpool.
- No multiverse mumbo-jumbo. Doctor Strange fusing universes or mutants being extradimensional travellers or such is very poor writing, as it takes away much from mutants and X-Men in general. Not to mention that the MCU multiverse has introduced worlds with different physics/dimensions, and not parallel Earths and timelines, yet.
So, now, it's no secret that the Marvel fanbase is divided into 2 distinct camps as far as movie rights go: people who want the Fantastic Four in the MCU, but not the X-Men; and people who want both the X-Men and the Fantastic Four in the MCU. While it is hard to argue over Fox's credibility as they have made great movies when they wanted to be good, there is no denying that X-Men, the franchise, isn't really something fans look forward to, all excited. The biggest problem people have with the X-Men in the MCU is that the huge number of mutants missing in this continuity to justify the in-universe public hate, which is kinda valid but can be simply worked around.
Assuming Fox and Marvel decide to work together, and distribute rights and usage among themselves(like really, Deadpool shouldn't be in any cohesive universe), the absence of mutants can be very easily explained.
Let's say, mutants are a rare species in this continuity. A recorded ~300-500 mutants locked up in a facility of Weapon X, a UN sanctioned program placed by Hydra for a few decades, collecting, covering up and experimenting on mutants to make supersoldiers, is more than enough. Why mutants are not public knowledge is pretty easy to explain: while weird incidents happened, the public collectively didn't link it to the evolution of the species or coin the term. Everything was very covert and managed really well. That doesn't necessarily mean they always tracked down people, and much of it also depended on reports and the danger of exposure if they went into areas which were/are known to other powerhouses, people or authorities, as Inhumans, Cloak, Dagger, or IGH soldiers. There could always be a dozen mutants sprinkled around the globe that they didn't get a hold of, especially telepaths because their powers aren't apparent. The first movie could start with a professor and his new student, Charles and Jean respectively, both telepaths, pulled into this world of human trafficking, as Jean is tracked down, after which they rescue these inmates from the facility. Eric/Magneto, being locked up for decades and being a prodigy with a deep hatred for Hydra, could work as to why he hates Nazis so much. The antagonist of the first movie could be, Weapon X with X-Force, a group of mutants who do all the dirty work of the the program, consisting of Wolverine, Psylocke and a few others. With the facility destroyed by Jean and Charles, the X-Force might leave, with nothing to hold them back on following orders, while the inmates are given an option to come with Charles, to which a few agree, becoming the first X-Men team. It is important to have Eric and the mutant kids interact with Jean during the movie, helping her. This elevates Eric to be a hero among some mutants who go with him, and so that we get to know Scott, Hank, Bobby and others before they come with Charles. Eric helping Jean inside the facility and Charles helping the kids once they are out could also establish some respect between these two characters, as they are really not familiar with each other here. The movie could end with mutants on the loose, the entire truth of the Weapon X facility and mutants, now public knowledge, and Charles and Eric with their own teams, and most mutants out there, on their own.
The second movie could try to establish the public hatred aspect, as the governments try to establish mutants as a threat, and also have Reverend Stryker talk about mutants being demons on TV, which could closely mirror how many communities are treated in todays world. Hate for powered people in the MCU isn't new, as seen in Civil War, Agents of SHIELD and Jessica Jones. However, giving the government and UN reason to save their image gives more incentive for them to run with propaganda to try to control the credibility of something they can't clearly control anymore. X-Force could become it's own TV show on FX or just another movie series that do not deal with the sociopolitical aspect of the X-Men, as the main line of movies do, and focuses on more personal stories of killers becoming heroes or something else.
And that is my pitch for how mutants and X-Men could work in the MCU.
As to why X-Men necessarily need to be in the MCU? They don't. But a lot of things could be done very well if they are. Pheonix Force, Starjammers and Guardians crossover, Havok and/or Wolverine in Avengers, Shi'ar Empire in a world with Kree and Skrulls, and mostly, a definitive movie universe with all things Marvel.