Does anybody know if this - http://docs.moodle.org/dev/NEWMODULE_Adding_capabilities - works for course formats too?
I can't see a reason why not. This is an API for any plugin type: http://docs.moodle.org/dev/Access_API
I don't know what you want to use capabilities for in course formats, just want to warn you not to use them to override the access to the modules. Because you will only affect visibility of module from course view page but link to module may appear in other places - gradebook, reports, activity block, etc.
I only want to use the functionality to provide my own capabilities at the course context level. Such that admins can decide easily for themselves if a teacher etc. can modify certain course format settings in my formats. This is because users have stated that they have removed editing functionality in code to prevent teachers from changing things and I thought there should be a better way.