You can definitely use a smaller cooler for the mash.
Many use the kettle and bag, brew in a bag (BIAB) method as that method requires less equipment. Speaking for myself, I built a 10 gallon mash tun as I find it's more versatile in terms of different batch sizes than smaller coolers. I only wanted to build one cooler versus having multiple smaller coolers, but your situation might be different.