You are indeed on the right track—specifically, it is saying that the people responsible should be severely punished (often, as in this case, fired).
The standard form of this idiom is "heads will roll," defined by Merriam Webster as
used to say that people will be severely punished or will lose their jobs because of something that has happened
When the boss finds out about the mistake, heads will roll.
It is an allusion to someone's head literally rolling on the ground after a beheading (one source). In modern English usage, it is much less literal: in most cases where this phrase would be used, an actual beheading would not be expected.