D&D, especially 5th edition, is highly customizable. I have found out that while the vanilla game is non-challenging and somewhat flat (compared to the previous editions, except 4th that can't be considered D&D), it is easy to fix these issues without that much effort. For the last few years I have been running campaigns (as a DM) using a hybrid of 5th edition and old school D&D (mainly 2nd) with great success. Challenge went way up, variation went way up, fun went way up, customization of characters went way up, in fact the concept was so successful that when the campaigns ended and we started another one with one of the former players as the DM, we kept the homebrewed rules I made.
Ah yes, the persistent myth of "5e is easy mode", which is actually primarily based on the DM running differently than designer expectations.
You see, it's rare to find a table that plays how the designers expected, and what the DMs are doing makes it easier for the characters. This isn't saying the DMs are doing anything wrong, just that the designers made some bad assumptions and calibrated it differently than most run. But if you run it like they expect, it's a lot more dangerous.
First, in every edition of D&D, combat is an attrition and resource management. HPs, spell slots, daily uses, whatever. Attrition - these get worn down over time. One battle is nothing. The eleventh battle since a long rest on the other hand is riding on a dagger's edge even without being something super challenging. The designers aimed for 6-7 encounters per long rest. They talked about it in design diaries back with the D&D Next playtest, it's listed in the DMG. No one regularly runs that many. With just as many over 6-7 as under. The modules don't do this. But that's where the designers aimed. And just amping up danger and doing fewer helps, but a lot less than someone would expect. A duration spell that would last all 3 rounds of a normal combat might like all 7 of a double strength combat - so got twice the utility out of the same resource attrition of that spell slot.
First part of magic items is number/rarity. Xanathar's spells out the designer's expectations for the whole party on page 135, and it's a lot less than what people expect who have run other editions.
Second part of magic items are plusses. In 3.x and 4e, magic item math was implicitly or explicitly part of expected character advancement math, so if you didn't keep up with the grind you fell behind what was expected. This was taken out of 5e. A 20th level fighter is on-par in terms of math expectations without a single plus on any item they have. Even a humble +1 weapon will put them ahead. DMs familiar with earlier editions often give out far too many +X items, as they were a needed staple in earlier editions. Again, looking at the Xanathar's chart, a 10th level party should have a single rare major item - so among the entire party there's a chance that there is one +2 item. Not everyone having a +2 weapon, armor, etc.
Ability scores - designer math expects standard array, or it's close cousin point buy. If you have a lot higher primary/secondary stats, then characters can both max the math faster, and can take more feats without the disadvantage of not taking an ASI against a very important ability score. Making them more powerful than designer expectations again.
Basically, if you play how the designers expected before the game was released, you'll find D&D 5e is a lot tougher game. They just misjudged how people would run it. DMs frequently do one or more of less encounters per day, more plentiful magic items, and rolled ability scores that end up being higher than standard array.
If you regularly have 6-7 encounter days, and just as many days over that as under it, if you calibrate magic items to designer expectation (unfortunately hidden in the treasure tables in the DMG until Xanathar's came out), and don't use rolled scores, it's challenging. If you don't, well then you need to go to hybrid extremes like you mention.