The light situation sounds good. Probably just a problem in this one pot, then. Stuff happens.
When someone asks if sandy (etc ) soil will do, I think they plan to get garden dirt from outside. Don't do that. Use good quality potting mix, cactus/succulent mix might even be better.
If the stem is rotted now, then the top is just surviving on its own already. A smaller pot and good soil will help ensure the plant dries out quickly between waterings.