I've written (and continue to write) for Ren'Py rather than RPGM, but I think the essentials are similar.
As far as the writing goes, it starts with an overall plan for the game. The game needs a story arc, character development, etc.
What are things like at the start? How have things changed by the end? Roughly what happens in-between?
Then break it down for individual releases. Each release needs to be interesting. I'm partial to the "Burn Notice" method where each season had a main story arc and each episode contained a piece progressing that main story, but each episode also had a self-contained story separate from the main story. For an Adult VN there probably won't be a complete story in each release, but each release should feel meaningful in some way (exception: Anime often have "Hot Spring" episodes and US shows often have "Clip-Show" episodes. These don't advance the plot, but should only have at most 1 per season.)
Then break down each release into individual scenes. Work out a rough summary of what should happen during the scene. Try to use as few scenes and locations as possible. Don't worry too much about the details - just who's there, where they are, and roughly what happens.
The next step is probably the most difficult. For each scene, create a rendering outline. This is essentially the entire scene (and often it is easier to write the scene while creating the rendering outline) written as notes to the graphic artist of what each render or animation should be. Just the essential information for the graphic artist (or yourself) for each render. An example would look something like:
## MC POV of Jane in Jane's bedroom. Jane looks pissed.
The final step is writing the scene. There should be 1-3 lines of dialogue for each render. Sometimes it makes sense to have 0 lines of dialogue for renders/animations, but usually you do NOT want 4+ lines of dialogue without changing the render. The reader of a Visual Novel is expecting Visuals. If you have 21 lines of dialogue with a single render you're going to lose readers. So, for example:
## MC POV of Jane in Jane's bedroom. Jane looks pissed.
mc "What happened? Are you angry at me?"
jane "You fucked my best friend!"
mc "Oh, you found out about that."
There are a lot of other notes that I could include (balancing the number of player choices and scenes, balancing sex scenes with story progression, etc), but the above covers most of it. Mostly - each scene should serve a purpose, each release should feel like a meaningful progression in the story/characters, and there should be an overall game plan for the game/story.
As for software, it is completely up to you and your team. You want the relevant team members to be able to access everything they need to, so it depends on what you and they already use. I recommend storing the code in something like GitHub and the writing in something like Google Docs. If only one person is working with the code, then it could be stored on a single computer (and backed up regularly to something safe!) If only one person is doing all the writing, then it could be done in something like MS Word. However, if you have a group of people collaborating they should be able to see what each other are doing. If you are doing it all by yourself, just use whatever you are comfortable using.