For prevention of this problem:
1. Better chamois. For long-distance riding some shorts are actually described as being "century" rated, but I usually just feel up each and every pair of shorts on the rack and squeeze each chamois until I find the thickest most plushy cushy chamois. And, invariably, the price tag is usually $60+.

2. Chamois butter/diaper cream. Use it, use lots of it and apply liberally front and back.

3. Find a better saddle with well-designed cutout. The first cutout saddle I tried was actually worse because the ridges of the cutout hit me in a very bad way, finally I found a cutout saddle that was shaped well. As for what makes it shaped well or not this is all very anatomy dependent and we're all built differently so I won't make a brand recommendation. Like shoes, it just has to fit your body. A good cutout saddle will move the pressure from the center out to the sides which is tougher skin and the softest delicate tissues just hang out in the groove.

4. Take your shorts off immediately after a ride and air out.

For relief once the damage is done, if you are in significant pain/discomfort I highly recommend a product like Vagicaine. In the feminine hygiene products section look for vaginal creams that contain benzocaine/lidocaine, there are several brands. They are strangely numbing and I would never advocate using this on a regular basis as a means of coping with bad clothing/gear, but for occasional use once you're up that creek it is a lifesaver. Other people's lives, that is... there's nothing like coochie-pain to make me homicidal...