mainTerm[expr_,x_]:=Module[{approxpoly,prec=1,j=0,expon,coef},approxpoly=Normal[Series[expr,{x,Infinity,prec}]];
While[approxpoly===0&&j≤5,j++;
prec=2*prec+j;
approxpoly=Normal[Series[expr,{x,Infinity,prec}]];];
approxpoly=PowerExpand@approxpoly;
expon=Exponent[approxpoly,x];
coef=Coefficient[approxpoly,x,expon];
coef*x^expon]

mainTerm[(x^3+1)/(x+1),x]

mainTermAtOrigin[expr_,x_]:=mainTerm[expr/.x->1/x,x]/.x->1/x

mainTermAtOrigin[(x^2+1)/(x+1)-1/x,x]