Aggregate wins over Spartak Trnava and Anderlecht in the first two UEFA Europa League (UEL) qualifying rounds counted for nothing last week when Hacken were eliminated by Brann and dropped into the UECL, knowing a defeat over two legs would spell the end of their European campaign.
The Wasps began the match as if they had a point to improve, and were ahead inside two minutes when a neat move picked out Layouni, whose cushioned volley across goal was knocked in by Simon Gustafson.
The home side doubled their advantage in the 18th minute, with Layouni again the provider from the left wing, crossing this time for Silas Andersen, who made no mistake with his header.
Cluj were forced into a substitution just two minutes later, but were powerless to stop Layouni, who got free on the left once more and his low ball in found Adrian Svanback, who guided it home to make the score 3-0 with 24 minutes played.
The visitors thought they had reduced the deficit when a Meriton Korenica free-kick was saved by Etrit Berisha and Louis Munteanu gobbled up the rebound, only for VAR to determine Munteanu was offside.
Things went from back to worse for the Romanian side with 10 minutes of the half to play - as the unstoppable Layouni registered his fourth assist of the night, reaching the byline and cutting the ball back for Gustafson to fire his second in off the underside of the crossbar.
Only a fine stop from Otto Hindrich prevented Gustafson completing his hattrick a minute later, before Cluj gave themselves a glimmer of hope with the fifth goal of the first half.
Munteanu was forced out wide after attempting to round Berisha and instead crossed the ball to the edge of the six-yard box, where Beni Nkololo teed up Korenica to power the ball home.
Half-time did nothing to stop either the goals raining in Gothenburg, or Layouni setting them up for Hacken. Four minutes after the restart, he was again given time and space to put the ball on a plate for teenager Isak Brusberg to finish.
No sooner had Hacken regained the four-goal lead did they lose it once more - Andrei Cordea raced onto a searching ball over the top and caught it sweetly on the bounce, striking across Berisha and into the bottom corner.
Just past the hour mark, it was 6-2 to the home side, only this time Layouni wasn't the provider. Instead, Svanback won possession back high up the pitch and eased the ball through for John Dembe to slot into the bottom corner.
With 70 minutes on the clock, it was seven for the Svenska Cupen winners, as Svanback continued his Layouni impression by setting up Dembe once more.
Despite 20 minutes still to play at more decent opportunities for the home side, they could not humiliate Cluj further and will take a 7-2 lead to Romania next week, where only a miracle will stop them reaching the UECL League Phase and just their second European competition proper after a UEL Group Stage appearance in 2023.