Your solution to krausen foaming up into the airlock is what I did when this happened to several of my earlier batches. It hasn't happened for quite a while, because I learned that a somewhat lower fermentation temperature for my ales is better. That tends to keep the fermentation tamed down somewhat.
“Malt does more than Milton can / To justify God’s ways to man”
-A. E. Housman (1859–1936). A Shropshire Lad , 1896.