The difference is clear-cut: 'però' flips things around, 'perciò' explains the consequence. I remember I used to get confused too when I had to dash off a quick message on my phone, until I linked it to two mental images. With 'però' there's a clash: "I finished my homework, però I don't want to go out" - the second part contradicts what you'd expect. With 'perciò' instead one thing flows from the other: "I finished my homework, perciò I can go out" - going out is a logical consequence.
Try thinking of it this way: 'però' is when the second fact surprises you compared to the first, 'perciò' is when it concludes naturally. "He was very tired, però he kept working" - you'd expect rest, but no. "He was very tired, perciò he stopped working" - the conclusion was obvious. If you read the sentence and hear a "but..." in your head, you need 'però'; if you hear a "so..." or "therefore...", you need 'perciò'.