Seems to me that there are three different things being discussed here: The minimum length of threads necessary to avoid a dangerous gun; the length of threads that reaches maximum safety of the join, without considering other factors; and the length of threads necessary to ensure that the join is at least as strong as the barrel itself.
To the extent it the first question can be answered objectively, the best answer so far comes from HelmutKutz: 7/7.5 full threads of engagement is the standard minimum for pressure vessels.
The second has been answered Paul Berkuta: 1.5 times the diameter of the male screw.
The third was answered by John Cholin: The area of the engaged threads should equal or exceed the area of the cross-section of the barrel immediately in front of the breech plug face.
Now, I have a barrel that needs a new plug, and I have been doing some back-of-the-envelope calculations using it as an example. It is approximately 1.03 at the breech, .45 caliber, with 5/8x18 threads. At 18 threads per inch, .42 inches of full threads is necessary to meet Mr. Kutz's minimum. The area of the barrel cross-section is approximately .8496 square inches, so if I use John's formula and hypothesize .5 inches of thread I get approximately .87 square inches of thread, meaning that the threads are as strong as the barrel wall itself at approximately 1/2" of engagement (ignoring the difference between 8620 and 1018 steels, for the moment. Also, is this for tensile strength or shock impact?) I could go with 15/16" of threads, but that would mean counterboring and drilling the touch-hole through the threads, necessitating lengthening the threads yet again to compensate. It also means that the breechplug can't be removed without mucking up the touchhole, which is a safety issue in itself IMHO. And, in the end, it wouldn't add anything to safety of the gun as a whole.
1/2" of threads, unnotched, in both 5/18-18 and 3/4-16, at the very least meet the minimum standards for strength. In the case of the barrel I looked at above, it doesn't appear that adding to that length gives any practical benefit, and it is a pretty stout barrel wall, rather more than the average these days, I suspect. Now, I am aware that 1/2" of breechplug is NOT the same as 1/2" of full threads - the threads of commercial plugs tend to end ~1/8" before the tang, and there is some thread removed around the face of the plug. However, it does look to me like the usual plugs found these days aren't all that far removed from the optimal length, and 1/2" or a bit more of full threads, with no notch on the breechplug, seems like a very achievable goal without resorting to long counterbored plugs or making dramatic alterations to traditional architecture. With big bores and breechplugs larger than 3/4", that could change, of course.
Now, I wonder, what about the thread lengths on touch hole liners....
Edited to add: Double checked my math and the area of the barrel cross section is .878, not .8496, so 1/2" inch threads almost exactly matches it (I've been ignoring significant digits and using 3.14 for pi, so the exact relationship is uncertain, but the two figures are very close. Doesn't change the overall conclusion, though.