Before looking at loud vs stealth heists, there's one characteristic in what makes a good or bad heist that is consistent regardless- RNG. RNG is a huge factor in a number of heists in Payday 2, but that doesn't mean its presence is always welcome. RNG does not make or break a heist- Hotline Miami Day 1 is unchanging (basically) yet still highly enjoyable, Henry's Rock is highly varied yet fun (though flawed for other reasons).
The key to successful implementation of RNG, however, is that it should be used with the purpose of varying a heister's experience. RNG should not substantially change the difficulty of a heist, such that some rolls of the dice are objectively better than others. If RNG does impact gameplay, it should be in a appropriately compensatory manner; for example, if one possibility have a more difficult beginning than another, it should have an easier end as a result of that roll.
The perfect example of bad RNG is in Diamond Store, there is a chance the security room door on the outside will not spawn. This is a example of bad RNG because the heister is arbitrarily punished with a substantially harder heist without planning to handle this. This is game-changing RNG without any "upside" to balance it, in other words, bad RNG.
GO Bank provides examples of good and bad RNG. Good RNG implementation is seen with the infrequent "blackmail" phone call. It's a unique situation, costs you only a small price, and isn't terribly game-changing. Bad RNG implementation is seen with the Gensec/Police dispatch phone calls. These calls give you a small, additional challenge in the form of two extra guards/cops, and wisely doesn't even have these added "cinematic" challenges tied to the same pager system. At first, this seems like an example of good RNG- if not for the fact that your stealth run will automatically be ruined a few minutes after dealing with the new enemies, no matter what. This is an example of awful RNG implementation- some rolls will literally just ruin the entire heist!
Obviously beyond RNG there's a huge difference between what makes a good/bad heist for stealth and loud, so I'll look at each seperately.
There are two major characteristics to a Loud heist, Environment and Objectives.
The environment should feel bombastic and intense. Battling tons of cops at a motel while a gas station explodes next to you is intense. Fending off besieging cops at an FBI office while you hole up in a server room is intense. Escorting an armored truck through a sunny city as cops rappel down the sides of passing-by buildings is intense. Driving around a sunny city with goats playing around is not intense.
The environment needs to provide appropriate amounts of well-placed, seemingly-natural cover. This means that firstly, cover should not be too sparse OR too plentiful. Bomb: Forest is a great example of basically having no cover, and Undercover is a great example of both issues- in the hallways, rooms mean you never need to engage if you don't want to, but on the stairs and roof cover is non-existent and swarms of Specials and Snipers respectively punished you for that. Secondly, the cover should feel natural. This simply means that cover should be placed in locations that make sense to take cover in. For example, in Goat Sim Day 2, there is a stark lack of cover...not overall, as the barn provides an appropriate amount as a "base", but in the cage areas. If each cage area had more area-specific cover, along with small, transitionary bits of cover to get to those areas, then the first part of that day would be substantially better.
The spawns of cops need to be an appropriate amount for the size of the environment. A good example of this not working out too well is Henry's Rock, an otherwise pretty good map made rough thanks to an absolute ton of cops spawning in a small, central area. This doesn't mean a ton of cops is always bad- Hoxton Breakout Day 2 and Hotline Miami Day 1 have a ton of cops, but also provide a large working space with avenues to circumvent chunks of these enemies.
If the environment is changing (you are constantly moving to new areas), the transitions to "new areas" must be either s special areas to replenish supplies are a fantastic way to prevent issues of "losing" supplies.