Shaykh Abdul-Muhsin Al-Abbaad was asked:

Question:

The Prophet (ﷺ) said:

‏ مَنْ بَنَى لِلَّهِ مَسْجِدًا مِنْ مَالِهِ بَنَى اللَّهُ لَهُ بَيْتًا فِي الْجَنَّةِ ‏‏ ‏

Whoever builds a mosque for the sake of Allah (from his own wealth), Allah will build a house for him in Paradise.

[Reported by Ibn Majah and graded Daif by Al-Albani in Daif Ibn Majah no. 140]

Is the engineer who establishes to build a masjid included in this reward even if he is paid a wage [for his work]?

Answer:

“The one who begins with the likes of this is not from it except if he donates. If he donates [his effort and/or skill] then no doubt he is upon good and a contributor. However, for a person’s concern to be amassing wealth and obtaining wealth by way of engineering houses and building Masaajid, then he is not [included under this hadith]. However, if he is seeking reward, then no doubt he is rewarded and is a contributor”.
[Reference]

Translated by

Faisal ibn Abdul Qaadir ibn Hassan
Abu Sulaymaan