Graham Fitch gives a lesson on how to memorize using pattern recognition in music. This comes via Pianist Magazine on thier YouTube. He gives a brief explanation of muscle memory and memory by ear but then dives into personalized pattern recognition. This is all very relatable to guitar as it’s just identifying patterns and technique on the instrument.
This is a very useful lesson! Pattern recognition practice will save hours of time and is much more musical than note by note memorizing.