There's actually a lot of room to work around the sequels.
- This episode is 9 ABY. Ben destroys the Jedi Academy at 28 ABY. That's 19 years for Luke's first class of students to be trained and graduate.
- There are 100 quadrillion sentient beings in the Star Wars galaxy during this era. The New Republic government was decapped in TFA. It doesn't have to be Republic vs. Empire; the power vacuum will mean Imperial remnants, breakaways, confederacies, corporate star federations, criminal empires, etc. As a background story you can still "save the galaxy" without having a galaxy wide spanning government.
- You could fast forward 20-40 years after Rise of Skywalker to a Master Grogu with a New Jedi Order for Episode 10.
- An aged Rey would be entirely optional. You could write her as a master on the council with Grogu, or write her out entirely (She stayed on Tatooine for a peaceful life).
- Luke still shows up as a force ghost to guide Grogu. More chances to wash the TLJ stain off by making him the voice of wisdom.
- You could add reasons why Luke went into self-imposed exile that made it seem more reasonable (He was going to go after Kylo Ren, but had to hide away to keep Ren's focus on him. Luke had met Mara Jade and she was pregnant with their baby when the academy was destroyed. Kylo Ren would have sensed the truth if he ever met Luke again in person, so Luke hid to protect Mara Jade and their child. He never brought it up before because...that would jeopardize his wife and child, obviously).
I don't think you could ever write away the events that happened, but you could write around it, add some context, and end up with a fledgling New Jedi Order trying to keep the peace in a screwed up galaxy, a cool Force Ghost Luke to wipe away TLJ stain, and (optionally) a MILF/GILF Mara Jade Skywalker and an actual genetic Skywalker child/grandchild.