Generalization of the flatness of R3

(see my own question and answer in MO)

Motivation

Consider the manifold M=R3 with the natural vector bundle connection . This connection, like any connection on a vector bundle, induces, or is induced by, a principal connection Θ on the frame bundle FM=R3×GL(3).
The curvature of this connection is, of course, zero:

Ω=dΘ[Θ,Θ]=0.

The pair (R3,Θ) can be obtained from the point of view of Cartan geometry. This way we can understand to what extent the flatness of R3 can be generalized to arbitrary homogeneous spaces.
We have the affine group G=Aff(3)=R3GL(3) (we fix it as the "relevant" transformations on R3) together with the closed subgroup H=GL(3) (the "relevant" transformations fixing a point). The Klein geometry (G,H) provides the base space M, and the Maurer-Cartan form A of G is a Cartan connection with, of course, zero curvature

dA[A,A]=0,

because of the Maurer-Cartan equation for any Lie group.
Since this is a reductive Klein geometry, the Cartan connection A splits

A=Ah+Ap

for every specific choice of the subspace pg such that g=hp. The part Ah is a principal connection on the frame bundle FM, playing the same role as Θ, but not necessarily equal to Θ (is a different connection). Why do we have in this case a natural choice of p such that Ah=Θ?

Generalization

The goal is understand what do we have to require to an arbitrary Klein geometry (G,H) so that it behaves in the same way that Rn "with respect to flatness". That is to say, in order to have G/H be flat not only as a Cartan geometry, which is trivially true by virtue of Maurer-Cartan equations, but also to have that the principal bundle

GG/H

have a canonical flat principal connection.
(By the way, this principal bundle is interpreted as the set of "G-frames" for the space X=G/H, and the principal connection is a way of deciding if an assignation of G-frames along a curve in X is constant.)

And I think that the answer is that G must have a normal subgroup N such that G is the semidirect product

G=NH.

The key would be the following proposition, which I hope is true,
Proposition
Let G be a Lie group that is the semidirect product of a normal subgroup N and a subgroup H, i.e., G=NH. Then the Lie algebra g of G has a canonical decomposition as an Ad(H)-module given by

g=nh,

where n and h are the Lie algebras of the subgroups N and H, respectively.

Sketch of the proof

So, assuming this proposition is true, the requirement of being a semidirect product implies that we have a reductive Klein geometry G/H, and then the Maurer-Cartan form splits as A=An+Ah, being Ah a principal connection on the principal bundle GX (see this answer), in a "canonical way" (since N is given).
Moreover, we have that n is not merely a vector subspace of g, but a Lie algebra, so [n,n]n. And because of this we can prove that the flatness in the sense of Cartan geometry (dA[A,A]=0) implies the flatness of the principal connection:

0=dA[A,A]==dAn+dAh[An+Ah,An+Ah]==dAh[Ah,Ah]+dAn[An,An],

and since dAh[Ah,Ah] is h-valued and dAn[An,An] is n-valued we have

dAh[Ah,Ah]=0.