This is a good explanation. The necessary and sufficient condition for a function to be integrable is that the maximum amplitude of any differential tends to zero. Or the limit of the big sum of the dam is equal to that of the small sum of the dam.
This is easier to explain by differentiation. First of all, if the function is unbounded, then no matter what the differential is, the amplitude must be greater than 1 in a certain interval, which can be proved by the ratio interval set theorem. Therefore, if a function is Riemannian integrable, it must have a boundary.
As for the counterexample, is it an example that bounded functions are not integrable? This is a lot. For example, Riemann function is a counterexample.