Compound Poisson approximation for triangular arrays with application to threshold estimation