Carry on size solution
Instead of templates, visual inspections, size boxes, etc. the FAA should require all carry on to be first placed in an agreed upon size trash compactor. The machine would then be turned on and, like magic, all luggage passing the check point would comply!!!
End of story. End of problem. These things are so simple to solve!