My LFS had 12 EBA's in a 20 gal tank and had two spawning pairs, free swimming fry .. not ideal , however the footprint on a 40 breeder can support a trio of EBA's easily as I'm currently doing it myself. GL
LFS keep fish in small tanks because they don't plan on keeping them in the long term. I would never do something because it's done in a LFS. Usually they don't care about fish health. Rarely do they ever good advice, because they just want to sell fish. I had a guy at a LFS tell me an Oscar can live in a 40g for life lol.
Honestly a 40g is too small for one JD for life. A 6-8" shouldn't be kept in a tiny 40g. You need at least a 55g.