How is the microflow structured that you are trying to refactor?
If it is a large set of objects, what you can do is implement batching. You can then process batches of, for example, 500 items per iteration. After every batch you can clean up lists so you won't be out of memory.
In additon you can try to use the ‘Finish transaction’ and ‘Start transaction’ Java actions from Community Commons. These make sure that not all objects you are processing are kept in memory untill the microflow is done. A downside from this is that if an error occurs, the batches that alrady have been commited will not be rolled back.