"Safe thickness" depends on design.
"Safe" to me says ability to withstand some multiple of expected pressures.
Calculating peak pressures of a tube are part of the equation.
Sharpness of inside corners, and ALL the other factors of interior ballistics come into play.
So if you don't have the mathimatical training and engineering experience the best you can do is to depend on making something VERY similar to another proven successful design.
Pressure in the barrel will be reduced for the larger portion of the barrel if you have a powder chamber - Barren Coehorn employed that in the 1700's to allow a very thin large barrel with a very small powder chamber with thick walls - resulting in a light overall weight mortar.
So, two examples that I've built for myself (what I sell is MUCH thicker):
1. Beer can caliber with 3/8" thick walls. Bore 1/4" longer than a beer can, powder chamber that will hold perhaps 75-90 gr. FFg. Made from a short billet of hot rolled steel.
2. Golf ball mortar - hand held - 4140 steel with powder chamber. Perhaps 1/2" thick walls. Bore 2 calibers deep (will just hold 2 golf balls). Probably overkill on thickness considering the weight of the golf balls. Powder chamber holds about 2- 45acp cases of FFFg.
Should you go thicker? Yes if you are going to shoot lead spheres (higher pressure). Would that thickness hold - I would hope so, but I don't KNOW.
If you are matching the thickness of the cast cannons/mortars that are commonly available you are automatically adding to the design strength - cast iron/bronze is brittle compared to 4140 prehardened.
Could you add to the strength by hardening the 4140 - yes, but if it's too hard it will become brittle. It MUST be done right.
The bottom line is that you're going to take the best educated guess - based on someone's engineering or experience.