Where's the placement of your router? Unless you have lead lined walls 40ft is nothing for wifi. I pickup my wifi down the street. 5ghz network of course doesn't broadcast as the 2ghz network but something is wrong at 40ft you're having issues.
Doesn't take a lead lined wall to dramatically reduce range, walls in general have an impact and their composition will determine how much, as well as the number of them.
I'm using a Cisco MR20, but I've used a couple of Aironet AP's, a few Aruba AP's, and, prior to this one, an Aruba Instant AP in my house, which has three finished floors + a basement. AP is on the main floor, as central as I could get it without breaking into the plaster, which would have had it central in the front hall (house is mostly square). AP is on the wall closest to the hall in the living room, which is 13.5'x 23', at the mid-way point about 15" or so from the ceiling.
House is ~100 years old, walls are lath and horsehair plaster.
Reception on the main floor is perfect. Reception on the 2nd floor is good, though with previous AP's 5Ghz fills its shorts in the bathroom, which is ~20ft straight-line distance but through 2 walls and the 1st floor ceiling/2nd floor floor. Previous AP's haven't had smart band switching, but this one does and will push clients to the 2.4Ghz band when reception starts to drop-off, where the signal becomes strong again.
3rd floor (my son's "cave") is good reception directly above the living room (through 2 floors, but no walls) but no 5Ghz and only acceptable 2.4Ghz performance on the south side of the house where he has his consoles setup (PS4 previously, now PS5). His phone works properly too, but is also on 2.4Ghz. Straight line distance this might be 25ft or so (maybe 30) but it's through 2 wall/ceiling combos vs the north side of the space, so at least twice as much plaster.
Through open air, I can pick-up my Wifi almost a block away due to the large windows in my living room and I can use a WiTech (FCA/Stellantis dealer pod) in my driveway, which is about 25ft through an external wall, no problem, despite the unit having a very small antenna.
While it would be a bit unreasonable to average Joe Average home owner do a proper site survey to determine optimal placement of AP's (which assumes the likelihood of more than one) this is what is done in commercial installs and the construction/composition factors have a significant role in the number of devices required, antenna selection...etc. This also applies to very large (higher budget) home installs but is a conversation likely beyond the scope of this thread.