In the present article, the solution of the Einstein–Maxwell field equations in the presence of a massive scalar field under the Brans-Dicke (BD) gravity is obtained via embedding approach, which describes a charged anisotropic strange star model. The interior spacetime is described by a spherically symmetric static metric of embedding class I. This reduces the problem to a single-generating function of the metric potential which is chosen by appealing to physics based on regularity at each interior point of the stellar interior. The resulting model is subjected to rigorous physical checks based on stability, causality and regularity for particular object PSR J1903+327. We also show that our solutions describe compact objects such as PSR J1903+327; Cen X-3; EXO 1785-248 and LMC X-4 to an excellent approximation. Novel results of our investigation reveal that the scalar field leads to higher surface charge densities which in turn affects the compactness and upper and lower values imposed by the modified Buchdahl limit for charged stars. Our results also show that the electric field and scalar field which originate from entirely different sources couple to alter physical characteristics such as mass-radius relation and surface redshift of compact objects. This superposition of the electric and scalar fields is enhanced by an increase in the BD coupling constant, $$\omega _{BD}$$
ω
BD
.