CP is stored at offset 0xFE within the PB7 structure; your Grimer has 0xFE55 (65109) which is an invalid value -- it should be 880. Note that CP caps out at 10,000.
Opening your PB7 in a hex editor, it appears the Party data has been corrupted / is invalid.
The CP/Stat calculation thread you linked relates to floating point calculations; can result in different decimal values if not calculated with the exact same multiplication factors. Yours is a different "issue" that I don't believe is caused by PKHeX.
Did you happen to do anything else within PKHeX or another save editor program (like PKSM) to corrupt the party data? Sorting boxes perhaps?
If you check your stats in-game, they'll likely be garbage, or the game will auto-heal them and they'll be valid the next time you export the updated save file.