Can I compress a custom recipe into one command in Minecraft?

Hi, I love making "Vanilla Mods" for Minecraft, It's basically using Command Blocks to have mod-like effects. I've got my system working perfectly fine, but some of these Vanilla Mods require a concept called 'Custom Crafting Recipe' and this is what i have so far (sorry i don't know how to make a spoiler):
first command:
execute @p ~ ~ ~ testforblock ~ ~-1 ~ minecraft: dispenser 1 {Items:[{Slot:4b, id: minecraft: wooden_pic…
second command:
execute @p ~ ~ ~ setblock ~ ~-1 ~ dispenser 1 replace {Items:[0:{Slot:4b, id: minecraft: wooden_p… Of Density", Lore:["Hums gently around minerals."]}, ench:[{id:35, lvl:3}], Unbrea…

These two DO work, my question is: is it possible to have these in a single functional command?

Added (1). the codes are too long, so i'll put a printscreen in the answers (apparently i can't update with a picture).

Photo of commands: Can I compress a custom recipe into one command in Minecraft