Under Article (or Clause) 12 of the Tachograph rules, you are allowed to make emergency exceptions to the rules as long as you note the emergency on your disc (analogue) or printout (digital). These rules are usually used if you are, say, stuck on the M25 over your 4 1/2 hour driving limit due to an accident or something. However, Operation Stack would come under Clause 12 too. As long as you are 'reasonable' in what subsequent breaks you take, the authorities should be happy (I've never had any problems when I've had to do it).
The worse problem is food, toilets and boredom! When I did european work, operation stack was quite infrequent and we had naff all. I believe nowadays they put out Portaloos (wonderful on a hot summers day!) and I heard last week of a burger van driver who was asked to do a run down the trucks and took £1500 in 3 hrs!