Eeyup, that checks out.
The TypeError occurred shortly after I traded in one of my five team members for cash science. The ~3k I got were pretty useful for buying new weapons at that point, so I gave it a try. The error came up about four rooms later, it probably was the first battle with the smaller party and I didn't change the formation.
When I tried the same thing today, the error message occured again. I got the blue Beastman, then the Russian witch, then the hidden pig Beastman. I sold the blue Beastman, didn't change the active party and the first battle after that led to the crash. In the menu screen, the party consisted of four characters again, but in the formation screen, one of the slots was left blank.
The bug didn't appear when I tried the same thing while having only four (then three) party members, but it did reappear then I tried selling two party members so that I had only active party members left.
The New Game+ loop happened after a boss battle against two cartoony, ghost-like enemies. I don't remember their names, but it was rather late in a game and the floor had a lot of nurses and ???? enemies. The boss battle started on the lowest or second lowest tile of a long hallway. The timer ran out during the battle and I noticed that I had no chance, so I escaped to start a NG+ and...you know the rest.
I'm not familiar with the scripts you used, therefore I'm not sure how to fix these issues. But an automatic sorting of the active party members after losing one could help with the first bug. For the second one, I'm not sure how the engine handles the countdown event. Since it didn't interfere during the battle, the event probably triggered only after returning to the map. In that case, maybe increasing the timer by a minimal amount of time at the end of the battle and/or freezing it shortly before it runs out could delay the event? If the timer then runs out outside of the battle, the problem might be avoided without changing the gameplay. Having an event on the first map of NG+ that resets the timer (or just disables its game over event) could also help.
But then again, the conditions for these bugs are probably pretty odd, so maybe there aren't that many players who will encounter them.
However, another bug that I encountered in todays's playing was more serious. I'm not sure what triggered it, but on several occasions, the button to open the menu or cancel actions wouldn't work. Sometimes it would start while walking on the maps, sometimes it would occur while opening the menu. Once, it even happened right after saving - a lucky incident, since reolading would fix the problem. Other times, I would get stuck and had to reload without saving. One time I managed to trigger the bug, but after a boss battle, the problem was gone again.
It's apparently not dependent on the player's input, since neither Esc, Num0 nor my controller's button would work. I thought about the RPG Maker having the option to temporarily disable opening the menu, but that wouldn't explain why the buttons didn't work while being in the menu or even battling...strange.