How can I ensure that a new ceramic tile job won’t crack again?

You’re on the right track with your plans to add cement board to the existing subfloor, but I wouldn’t rely on this exclusively. You should also use a dimpled, plastic underlay called Ditra. It’s made by a tile accessory manufacturer called Schluter, and it goes a long way to ensuring crack free ceramics.

Trowel a layer of thin set adhesive onto your beefed up subfloor, nestled the Ditra sheet overtop, then trowel more thin set on top of that before setting tiles.

Unlikely as it sounds, Ditra creates an opportunity for the arrangement of tile and grout to move slightly relative to the subfloor, and this decoupling action reduces the tendency for cracks to form.