I lost my job in a not dissimilar situation more than a few years ago. I suppose it’s an example of the Peter principle. Your (ex)boss has clearly vastly exceeded his competence limits. It’s soul destroying to work for such a fool.

I went off and found a great job working for a great and wise man. There are plenty of them. They aren’t too hard to find. Good luck.