long story short, rooms matter alot, often at least as much as the cumulative effect of all the equipment
Exactly and it is my experience ...
but if you have a bad room, a lot can be done to make the listening experience fairly good, most notably minimizing room effects by going nearfield or semi nearfield
You are right for the "minimizing part...But even nearfield listening as you implicitly suggested ask for some acoustic treatment of the room to be optimized ...If you want a soundstage over the speakers in depth and encompassing the listener near field position for sure even in near listening you must put some reflective waves to good use .....
room treatments can help in some difficult rooms, but often a very bad/weird room just cannot be handled just by treatments
This is why in my "difficult" past room i used not only passive treatment with materials to reach a good ratio between dispersion , reflective areas and absorbing area and their location , but it was not enough ... I used ACTIVE mechanically tuned devices called Helmholtz resonators in a grid fashion all around the room to change the zone pressure distributions to my liking ...It was not esthetical , you needed a dedicated room but it cost me nothing , it was fun to experiment and the results were stunning ...A soundscape encompassing my listenin position at peanuts costs ...