Well I'd personally recommend PKHeX over PKSM just because it's easier to use to for most people, has more functions and supports Gen 1 - Gen 7. PKSM is amazing as well, but it's more for seasoned editors and doesn't support Gen 1-Gen 3.
Both of the programs are completely safe to use, of course they are save editors so there is a chance of corruption, just make backups of your saves before editing them and don't go over board. Some people like to MAX everything, or change things that weren't meant to be changed like X,Y coordinates and end up stuck in a wall or have or their game crash or something Lol.