A couple things might help. Routine, diet and relaxing.
Is she a social kiddo? It may help to have a few 'fun' things to do in the bathroom: magna doodle, sticker books, a paper doll. And then, keep her company while she's in there. Don't make her sit for any more than five minutes, but be clear when it's time to go. Don't ask--tell her that it's time to use the bathroom. If she's sharing toys/playing with another child, but her toys up to save them for her. Or if she's creating something, gently lay a light towel or scarf over it to 'save it' for her. (It's off limits for others.)
I'd also set some routine times of day for this. Some kids find baths so relaxing that it facilitates 'going', so after bathtime is one option. I'd find two or three times that she gets some escorted bathroom time (that is, if she likes company), especially in that window of time after meals are eaten. That often triggers peristalsys and thus, she may have an urge to use the toilet then.
Regarding her bottom: sometimes the child who is self-constipating suffers from stomach acids coming through the rectum, or the feces becomes hard(er) than usual. Two things can help here: using diaper wipes rinsed twice in warm water to wipe her until the redness subsides--this will remove the soap and cleansers--, and using an antiseptic cream. We like the DermaE tea tree oil cream/ointment for my son's bum.
Plenty of liquids and fresh fruits can help. My midwife suggested blueberries when I was pregnant, and that was great. Get them fresh or frozen, not dried.
You can also boil up some raisins with some steel-cut oats for breakfast. Joy of Cooking has a great recipe for this, PM me if you want it. We eat it sweetened with applesauce in the mornings and it's delish. Whole fruits and veggies too. Celery, carrots, corn, anything unrefined/processed.
Nuts, by the way, can be constipating, so be careful there. She's likely experiencing some bloating, too (tummyache) so steer clear of any carbonation or extra sugar/sweets, as they also can create gases, as can some brassicas (brocolli, cauliflower, cabbage).
Wheat, and gluten, too, can contribute to hard stools, so there's something to think about.
You might also visit a naturopath for this. I know of other families who have let this sort of self-constipating continue, and it's become a very sad ordeal for everyone.