This isn't "at scale"; this is a toy example.
If you're looking for a 'real world' use of the monoid laws and the way the compiler can build them up for you, you might want to have a look at [0] Monoids: Themes and Variations, where the author shows how these ideas work themselves out in a quite nontrivial diagramming library.