rule1=Product[a_Times,b:{i_,__}]:>Select[FreeQ[i]][a]^n Product[Select[Not@*FreeQ[i]][a],b];
f[i_,θ_]:=(θ+1)x[i]^θ
L[θ_]=Product[f[i,θ],{i,1,n}];
%/.rule1//Echo//Log[#]/.Log[a_^n_ b_]:>n Log[a]+Log[b]&//Echo//
#/.Log[(∏_(i=1)^n)((x[i])^θ)]:>Log[((((∏_(i=1)^n)x[i]))^θ)]&//Echo//
#/.Log[Product[X_,b:{i_,__}]^θ_]:>θ Sum[Log[X],b]&//Echo//
D[#,θ]&//Echo//
Solve[#==0,θ]&//FullSimplify//Echo;