I've updated the post to reflect this - thanks!
I was thinking about this last night before I went to bed (because of course I was) and I realized that the limit could potentially be higher considering moves such as Mirror Move, Copycat, Metronome, and Sketch. Still, each of these moves have their own deterministic[0] ways of working which could still be handled by this protocol.
But Sketch specifically is also counter to the point that "moveset can't be changed after the battle starts". With that move in particular, it technically could be.
[0] Even though it's "random" in the case of Metronome; the random just needs to be agreed upon beforehand.
Randomness as in the case of Metronome can be decided upon in the same way that other move randomness is handled.
An evolution / moveset change cannot occur during a competitive battle. Mega-evolving happens in battle but is "evolving" only in name; it's distinct from regular evolution ("Megas" weren't given their own dex number so they have the same as their regular form) and never prompts a new move being learned.
That being said, Z-moves[0] from Gen 7 and Dynamaxing ("Max" and "G-max" moves)[1][2] from Gen 8 could both result in more than four unique moves being used by one mon. With Dynamaxing I believe the maximum would be 7 unique moves given 3 turns each using a different max or g-max move plus turns using the regular 4 moves in the set.
[0] https://www.serebii.net/sunmoon/zmoves.shtml
[1] https://www.serebii.net/swordshield/maxmoves.shtml
[2] https://www.serebii.net/swordshield/g-maxmoves.shtml