The answer to most of these really depends on the specifics, but in general my advice is to keep the plane of rotation clear. Trebuchets, and pretty much anything with a sling, can throw backwards almost as far as it can throw forwards if mis-adjusted. I had a treb with a 300 foot range thrown well over 100 feet backward once when the sling failed for example.
Generally (but not quite always) if something breaks, the scary bits stay roughly in the plane of rotation. If the arm breaks for example, the projectile could easily go straight up or backwards, along with chunks of the arm and sling. Its pretty unlikely for anything to go straight sideways, though things that go almost straight up can fall down next to the treb. I generally envision the danger zone as an hourglass shape: thin around the center of the machine (axle) but widening the further down range or behind it you go.
Thus generally I try and keep almost as much space free behind as in-front, always stay to the side when working on a machine with any stored energy (counterweight not at the bottom for trebs). When ever possible avoid putting anything in the path of the counterweight or arm except when absolutely necessary, and have a safety in place when doing so (ex: loading the sling) that physically blocks the arm from moving in case of a trigger or winch failure (this is usually required by the rules of competition, and for good reason: its great practice to have a redundant safety). When ever possible (and for sure when firing) stay far enough back to the side that there is no chance the sling could even come close if whipping around.
Another thing to watch our for are winches. If you have a home made winch, if the ratchet breaks, or gets set to free wheeling mode, or you slip off the handle, you can very easily get a winch handle spinning really fast breaking you hands. Having a high quality ratchet, and be ready to just pull your hands back and back away to the side should anything go wrong while winching is a good idea. Always remember where the stored energy is, and how it could break loose and get you so you are prepared to just back away and let what ever happens happen if something goes wrong instead of having to think about it when something starts failing.
Should something go wrong (or right when actually firing it), hopefully you are to the side. Generally back away further to the side if you can so that if anything went straight up, you have more clearance before it comes down.
For small trebs, safety glasses are all the PPE I used: shattering wood or metal could easily take out an eye. Similar to working with a lathe, I always felt gloves might be more of a risk to get caught in something that to protect me. For larger machines a hard hat is a great choice. While it likely won't save you from an errant projectile direct hit, it helps communicate to others that its dangerous and the area nearby is only for people who are protected and know what they are doing, and it can save you from some things (like a ring from the sling to the head, or a glancing blow from a projectile). I did have a metal pulley shatter once: safety and a hard hat are pretty good against that kind of debris.
For more specifics, its really hard to give clear safe answers. Starting with low counter weights, safer projectiles, no spectators and ideally smaller model machines and/or simulations can really help you get a sense for the risks while keeping safe. Work your way up to higher risk situations carefully so you will be able to evaluate them better. Hopefully such an approach can get you a better sense of how big of margins are needed. Most large trebuchets tend to have low enough mass ratios that 300 arm lengths is easily enough, but it really depends on the details (drop height, mass ratio, how much roll is possible etc), so in some extreme cases that might not be enough, and in some other extreme cases is far more than necessary. Looking at total stored energy in the treb and computing how far it could throw if 100 percent efficient could give you a rough upper bound (after accounting for rolling), though most designs won't even get close to that.
I personally haven't operated any really large trebuchets, and I can never really know how lucky I got to come out of almost everything safely (one assistant got a bloody finger when hit by a broken pulley once), so I can't really give any high confidence or athoriative advice, but hopefully this, and some careful thinking and planning, can help you operate safely. Good luck, and may the stored energy leave your systems in a safe manner!