How long can I safely use a chain for?
The problem with worn, stretched chains are: increased wear on the cassette sprockets and chainrings, poor shifting, chain slipping on the sprockets, reduced efficiency and increased chance of the chain snapping.

Normally it's considered 'safe' to run a chain up to 0.75% elongation before risking encountering those problems. If you really care about sprocket and chainring wear replace at 0.5% elongation.

If the sprockets and rings are already well worn and everything seems to be working OK for you, just keep going until problems really start to manifest or something fails terminally, at which point you replace the cassette, rings and chain in one go.

Chain slip or the chain snapping could of course put you in actual danger of a crash, especially as both are likely to happen when you are applying maximum force on the chain in a low gear ratio.