What is the meaning of [It is ill jesting with edged tools]

It is dangerous to play with sharp tools. Similarly it is dangerous to meddle
with anything that may get you into trouble. For example, to take ‘pep’ pills
condemned by the medical profession is to jest with edged tools.