I have a Sony receiver, Sony TV, XBOX One, and an ATV 4 and HDMI CEC has been a constant source of extreme frustration.
I was able to get the Apple TV to power on the receiver and TV and power them off but then the TV would randomly stop powering on or off with the ATV and after unplugging the power on the TV it would work again for awhile. The TV would also constantly lose external audio from the receiver and switch to its internal speakers. The Apple TV would highjack the receiver output even without waking it from sleep when I just turned on the TV and my Cable box. The ATV remotes ability to control the receiver volume would stop working all the time and the receiver would randomly mute itself. A few days ago I was using the XBOX and it kept losing video output to the TV during a gaming session due to HDMI HDCP. Overall CEC has been a real horror story for me.
Other than these CEC issues I like the ATV 4 just fine but it seems like the lack of absolute CEC standards across manufactures and having multiple devices that are vying to control each other makes CEC much more bother than its worth. I gave up and have disabled it on all my devices for now.
I'm not discouraging you from trying to make it work but there are many that are having these types of issues. This isn't all on Apple either as its impossible to test against millions of home theatre equipment combinations. I think Apple concentrated on a direct ATV --> TV configuration and that probably works much more consistently but many of us use an AV receiver now as a home theatre hub.