there is no such thing a perfect temperment. the western scale is a mathematical accident, a guitar is an even tempered instrument although intonation is never perfect an ideal guitar never has a perfect harmony. there are many ways to tune a piano and most are called well tempered, they have better harmonies but only in some keys, there is always a wolf key or wolf tones in each key, any attempt to something better will put a deficiency somewhere else, and a guitar is a particular challenge do to the many different chord shapes. if you stick to one chord shape the open strings can be tune to pure intervals and you can move that shape up or down. good theory for slide players but most people wont stick to one shape.
other alternative is to have each note and there for each fret at each string intonated to the notes of a well tempered piano and have a particular set of wolf notes that you live with. or you can go fretless and like a violin you can tune open strings to pure harmonies and can use any chord form as long as your fingers hit the notes correctly and you have perfect pitch.
or you can stop worrying about intonation, get it close and play your instrument!