Combined with a car crash in 2015 in which he sustained a serious head injury, his life began to unravel.
On June 2, he was the passenger in a car parked outside a liquor store in Milton.
Police spoke to Thompson about a demerit-point suspension and when he wound down his window, the officer caught an unmistakable odour.
Thompson admitted he had cannabis on him and placed a small bag on the dash of the car.
When police searched the vehicle, they found 16 individually wrapped $50 bags of the class-C substance. Nearly 30g of cannabis was seized in total.
Also in the car were resealable bags and scales, though Thompson was adamant the drugs were for personal use.
He maintained that stance at sentencing when pressed by Judge Michael Crosbie and claimed he had been "stockpiling'' cannabis because he was "in a dark place''.
The judge was sceptical but said it mattered little because the charge to which the defendant pleaded guilty implied the drugs were for sale. It was a significant fall from grace for someone with such potential, he said, but a necessary one.
"He believes the court involvement has been a blessing in disguise as without it he would not have been so motivated to stop using cannabis,'' Judge Crosbie said.
"Over the years he has resorted to cannabis to medicate and numb his feelings when it has all been too much.''
Counsel Marie Taylor-Cyphers argued a sentence of community detention would allow her client to continue studying, while home detention and imprisonment would not.
The judge agreed that incarceration was inappropriate.
The court heard Thompson was averaging an A in his university maths papers and hoped to become the first person in his family to complete his studies.
Judge Crosbie sentenced him to five months' community detention and 200 hours' community work.
"I think if I was a betting man there would be a very good chance we would never see you back in court again.''