Maybe in some horrible organisations they do immediately disqualify you, but working with people that have gaps is often interesting and fulfilling.
Also, whatever you learned about life in the gaps can be very useful to your employer!
Maybe those gap-experiences make it easier to build relationships with coworkers and customers? Or gave you the confidence in life to reach out when a coworker is having a rough time personally? Or allows you to dare side-step hierarchy and get stuff that is important to customers done instead of getting bogged-down in endless meetings? Or allows you to bring a healthy culture of work-life balance to your employer?
All these things could have a big positive financial impact on the business.
I would include gaps on your CV and highlight what you learned or enjoyed during this time of your life.
Finally, if you tick the tech-checkboxes, recruiters probably unconsciously prioritize candidates that have an interesting life-story to talk about. I would rather talk about your gaps that all human beings can relate to, rather than about some random tech I'm not really all that familiar with.
Good luck!