The meaning from Prov 23:1-3 is quite clear - Solomon is advising that people restrain their appetite and gluttony as if their life depended on it.
When you sit down to dine with a ruler, consider carefully what is set
before you, and put a knife to your throat if you possess a great
appetite. Do not crave his delicacies, for that food is deceptive.
Paul has similar advice in Phil 3:19 -
Their end is destruction, their god is their belly, and their
glory is in their shame. Their minds are set on earthly things.
Note the Pulpit commentary on Prov 23:2 -
Verse 2. - And put a knife to thy throat, if thou be a man given to
appetite. "Stab thy gluttony," Wordsworth. Restrain thyself by the
strongest measures, convince thyself that thou art in the utmost
peril, if thou art a glutton or wine bibber (Ecclus. 34 :12).
Matthew Poole is similar:
Put a knife to thy throat; restrain and moderate thine appetite, as if
a knife or some other thing stuck in thy throat, and hindered thee
from swallowing what thou didst desire; or as if a man stood with a
knife at thy throat ready to kill thee, if thou didst transgress; or
though it be as irksome to thee to do so as if thou hadst a knife put
to thy throat.