1. If you don't have a good experience in repair and/or DIY works of this kind, then it's better to leave it as is (do not touch it at all, especially if PC works properly), or to leave this work for repair service professional. AM4 socket is quite vulnerable to a mechanical impacts (it has very thin pins, unlike older Socket versions), it's very high risk to cause damage if try to disassemble it having no proper skill and experience. If Socket's pins will get torn off of the motherboard, then it might be very difficult to repair it even for qualified service engineer, in worst case such repair work may cost more than new motherboard, or it might be not practically repairable at all.
2. If it's isopropyl alcohol of the proper quality, then it's safe.
In some cases it's more effective to use a special gasoline that is specially intended for such kind of works, because it dissolves some substances better than isopropyl alcohol does.
But (looking at the photo) i wouldn't suggest to use it for cleaning the Socket in this case, because dissolved thermal grease may get taken inside of the socket and to disrupt the electrical contact with CPU's pins, and as said before - it's better to not disassemble the Socket having no proper skills and experience.
Though, you may safely clean the CPU's pins with isopropyl alcohol (using, e.g., soft paintbrush), but carefully, to not cause damage to a pins (they are very thin and may get torn off easily).