Set initial max level, increase it at a certain point YanFly's core engine?

Essentially title. I'm looking to increase the level cap post-story. Lock it to 99 for the story in typical RPG fashion, then crank it to 9999 after the story for kind of a "Enjoy breaking yourself and being OP" so side quests done after the main story can keep you enjoying getting new skills, equipment, etc, while the enemies scale with you(already got that, btw, I'm just giving a breakdown of what's going on and why).

So, how would I do that? Maybe HIME's Level Up events, turn off EXP gain by a switch once the variables reach a certain point? Or combine that with YanFly's passive states to slap a state on them at 99 to stop EXP gain, then have the final scene remove it?
Another possobility is if for example Yanfly's Core have a line which sets the max level to a fixed value, we can simply hijack the code and instead of it using a fixed value, we make it use a game variable instead. That way you will just set the game variable to 99 at new game, and set it to 9999 post-game.

If yanfly's core doesnt have that, then we just need to hijack the code from the base JS files instead.

But ofc if you can already do it via the methods you already included in your main post, then there's not much reason to do this anymore.
Alternatively:
If you still need it, Mr.Trivel has a plugin that does exactly what you need. (I use it myself.)

Max Level Restrictions

Link
I'm assuming it'd work with numbers bigger than 99, but haven't tested.
Yeah, I was questioning if there was a simpler method to do it than those.

Original thread: https://forums.rpgmakerweb.com/threads/set-initial-max-level-increase-it-at-a-certain-point-yanflys-core-engine.108497/