I note that the OP says they received a letter rather than an email.
Scam emails are rampant... they're essentially free for the scammers to send out and so they do, in industrial quantities. Scamming by post needs a bit more effort and expense so is rarer and/or more targeted, which changes the likelihood it is a scam attempt, I think. It still happens too of course.
As mentioned previously, I think it'd be quite hard for someone to get into a situation where you owe HMRC money - and HMRC have got far enough through the recovery process to offload it to a collection agency - without that someone knowing the debt exists.