The solicitor's actions in requiring a prospective beneficiary to make such a declaration
are in accordance with the general duty to avoid liability for economic loss to others caused arising from negligence.
Lawyers are, like anyone, entitled to presume the truthfulness of a Statutory Declaration
when they act upon its contents.
It would be negligent for us (lawyers) to simply take a person's word for it that they are not a bankrupt.
It would also be negligent to not look after an executor client facing the same hazard.
We use the oathen aspect of a Statutory Declaration as a defence to any claim against us (or against an executor client)
arising from lies (including lies by omission) told by would-be beneficiaries.
But, as you say, sometimes, people lie in Declarations.
One example is when a bankrupt, or an imminent bankrupt, or
a director of an insolvent (or near insolvent) business, perhaps facing a call on their personal guarantee(s),
lies to the lawyer (or to the executor) about their true financial position.
Loss arising from such a lie is a foreseeable risk
of the kind contemplated by the civil liability legislation.
Indeed, it is so "reasonably foreseeable" that we (lawyers) will from time to time
cross check the truth of a Declaration of this type by making an index check anyway.
So, yes, sometimes we can already know if you are a bankrupt, or an imminent bankrupt,
or an insolvent director, even before you lie to us in the Declaration.
(not to mention that a person can be prosecuted for lying in a Declaration)