A Western Australian man has pleaded guilty to making threats against Prime Minister Anthony Albanese and NSW Premier Chris Minns.