You can do that, but if there's going to be any exposed edge, you'd need something to cover the exposed edge thickness of the HardieBacker plus tile. In reality, you could also just buy some 1/4" drywall, which is cheaper, will use cheaper screws, is a larger panel so fewer joints, and easier to cut.
The thickness of the tile plus the CBU will likely mean you'll need to buy extensions for each electrical box to bring it flush with the top of the tile to be code compliant. They're cheap, and come in a variety of thicknesses, plus, if necessary, you can stack more than one, but it's best to just find the thickness you need (or move the boxes!).
When working with HardieBacker (or really, any surface, but especially HardieBacker), keep in mind that the stuff is VERY thirsty, and will suck a huge amount of moisture out of the thinset prior to you having a chance of trying to embed the tile. Use a wet sponge to wipe it down to remove any dust and supply some moisture to the board so it doesn't dry your thinset out. It's not too wet unless you can see liquid droplets on the wall...IOW, you really do want it wetted to make things easier on yourself.