Well, I see no one seems to know how to do this either, but I think I have an idea, I just don't have the chops to make it happen. My guess is that the Pokemon that must stay in the party could be prevented from being stored and/or released by editing the coding for the "pokemonStorage" script. There are a ton of "checks" where the script looks to see if the Pokemon you are trying to store is your last Pokemon. If we could create a "check" whereby the script would look to see what Pokemon you are trying to store, this might be doable? Like, for example, say the Pokemon you can't get rid of is a Bulbasaur, the script could check to see if the pokemon is in fact Bulbasaur, and if it is, the script would reject the attempt. I just have no idea how to create such a check.
I'm hoping maybe someone might be able to take this idea and run with it?