Honestly, the Pixel phones are probably the best compromise between your requirements. While Samsung gets slightly longer support, the bloatware, IMO, is just too much (depends on your definition of bloatware though). Plus the Pixels are first for latest Android and are generally well-supported with third-party ROMs (Lineage, Graphene, AOSP, etc). So my suggestion is the Pixels, (the "a" series for a less expensive choice).