They make child-proof locks for cabinet doors for this exact reason. They are pretty easy to install and pretty tough for small children to get into. But to further answer the question, is it a good idea? I guess that depends on if you have small children running around all the time. In my case, I haven’t had a small child in this house in…well…ever in this house.
Around the house, there is more than just household cleaners that might be poisonous. There are plenty of automotive liquids* than are poisonous as well. Assuming there are children and pets around the house, yes, there should be a type of lock on these products.
*A antifreeze leak on your car can be deadly to pets and other animals because it is sweet.