There's no smoking gun here.
Can provide some educated guesses and a solution.
The walls may have been poorly prep'd in that area before the sand texture was applied. Meaning the sand texture was poorly bonded to the drywall.
The water in the primer and paint acted like a solvent, dissolved the bonds and the primer, paint and texture came off.
Most modern primers need about an hour to set up before finish coating. If the dehu runs a lot that means the moisture levels are high and it would taXXXXX XXXXXer to cure.
It will take days for the entire assembly to dry.
Running a fan against the ailing wall will speed the process.
When the wall is thoroughly dry you can recoat.
It will be a challenge to match the sand texture.
You can get a similar product at a paint store.
add it to the paint and roll on.
It'll be similar, but not identical.
To test the walls dryness attach a piece of aluminum foil to the wall where the damage is. Tape the perimeter of the foil. Wait a day and carefully remove. If there's no moisture on the inside of the foil the wall's dry enough to paint.
Have I answered your questions?