In general, 2 hours should be fine: Minimum connection time for KUL is 1hour, so it’s definitely legal.
At the same time, it will really depend on your flight (and day/date), and a delay could still happen on any flight due any number of unforeseen issues.
In general, it seems earlier flights from CGK tend to have less of a delay on average, while those in the afternoon & evening seem to average ~40min delays with greater potential for longer delays the later the flight is... You can look at flightstat’s ‘on-time performance’ data for an idea for your specific flight.
Personally, I’ve done flights on separate tickets leaving regional cities with transit times closer to the MCT than 2hrs. I have been burned on a LON-KUL flight which got delayed by 1:30, yet I still do it knowing the risks (knock-on-wood).
Coming back to the thread topic, i.e. checked baggage across the two tickets, not sure how MH would handle it if the second flight is missed... the checked bag would have been accepted by MH for a CGK-KUL-XXX trip or vice versa, so still in the system and still tagged... *shrug*