You're right. They're encoding just regular JPEG for lossy compression. They're also using either ICER and LOCO for lossless compression. JP2 has been used for other Mars spacecraft (the HiRise orbiter, I believe), but the JPEG encoding was inherited from the Mars Insight lander (in 2018).